Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/contrib/libarchive/cat/test/test_stdin.c
39507 views
1
/*-
2
* SPDX-License-Identifier: BSD-2-Clause
3
*
4
* Copyright (c) 2017 Sean Purcell
5
* All rights reserved.
6
*/
7
#include "test.h"
8
9
#if !defined(_WIN32) || defined(__CYGWIN__)
10
#define DEV_NULL "/dev/null"
11
#else
12
#define DEV_NULL "NUL"
13
#endif
14
15
DEFINE_TEST(test_stdin)
16
{
17
int f;
18
19
f = systemf("%s <%s >test.out 2>test.err", testprog, DEV_NULL);
20
assertEqualInt(0, f);
21
assertEmptyFile("test.out");
22
assertEmptyFile("test.err");
23
}
24
25
26