Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/contrib/libarchive/unzip/test/test_p.c
107436 views
1
/*
2
* SPDX-License-Identifier: BSD-2-Clause
3
*
4
* Copyright (c) 2023 Adrian Vovk
5
* All rights reserved.
6
*/
7
#include "test.h"
8
9
/* Test p arg - Print to stdout */
10
DEFINE_TEST(test_p)
11
{
12
#ifdef HAVE_LIBZ
13
const char *reffile = "test_basic.zip";
14
int r;
15
16
extract_reference_file(reffile);
17
r = systemf("%s -p %s >test.out 2>test.err", testprog, reffile);
18
assertEqualInt(0, r);
19
assertTextFileContents("contents a\ncontents b\ncontents c\ncontents CAPS\n", "test.out");
20
assertEmptyFile("test.err");
21
#else
22
skipping("zlib not available");
23
#endif
24
}
25
26