1a2a3407cSMartin Matuska /*- 2*bd66c1b4SMartin Matuska * SPDX-License-Identifier: BSD-2-Clause 3*bd66c1b4SMartin Matuska * 4a2a3407cSMartin Matuska * Copyright (c) 2017 Sean Purcell 5a2a3407cSMartin Matuska * All rights reserved. 6a2a3407cSMartin Matuska */ 7a2a3407cSMartin Matuska #include "test.h" 8a2a3407cSMartin Matuska 9a2a3407cSMartin Matuska #if !defined(_WIN32) || defined(__CYGWIN__) 10a2a3407cSMartin Matuska #define DEV_NULL "/dev/null" 11a2a3407cSMartin Matuska #else 12a2a3407cSMartin Matuska #define DEV_NULL "NUL" 13a2a3407cSMartin Matuska #endif 14a2a3407cSMartin Matuska DEFINE_TEST(test_stdin)15a2a3407cSMartin MatuskaDEFINE_TEST(test_stdin) 16a2a3407cSMartin Matuska { 17a2a3407cSMartin Matuska int f; 18a2a3407cSMartin Matuska 19a2a3407cSMartin Matuska f = systemf("%s <%s >test.out 2>test.err", testprog, DEV_NULL); 20a2a3407cSMartin Matuska assertEqualInt(0, f); 21a2a3407cSMartin Matuska assertEmptyFile("test.out"); 22a2a3407cSMartin Matuska assertEmptyFile("test.err"); 23a2a3407cSMartin Matuska } 24a2a3407cSMartin Matuska 25