1e64fe029SMartin Matuska /* 2*bd66c1b4SMartin Matuska * SPDX-License-Identifier: BSD-2-Clause 3*bd66c1b4SMartin Matuska * 4e64fe029SMartin Matuska * Copyright (c) 2023 Adrian Vovk 5e64fe029SMartin Matuska * All rights reserved. 6e64fe029SMartin Matuska */ 7e64fe029SMartin Matuska #include "test.h" 8e64fe029SMartin Matuska 9e64fe029SMartin Matuska /* Test p arg - Print to stdout */ DEFINE_TEST(test_p)10e64fe029SMartin MatuskaDEFINE_TEST(test_p) 11e64fe029SMartin Matuska { 12e64fe029SMartin Matuska const char *reffile = "test_basic.zip"; 13e64fe029SMartin Matuska int r; 14e64fe029SMartin Matuska 15e64fe029SMartin Matuska extract_reference_file(reffile); 16e64fe029SMartin Matuska r = systemf("%s -p %s >test.out 2>test.err", testprog, reffile); 17e64fe029SMartin Matuska assertEqualInt(0, r); 18e64fe029SMartin Matuska assertTextFileContents("contents a\ncontents b\ncontents c\ncontents CAPS\n", "test.out"); 19e64fe029SMartin Matuska assertEmptyFile("test.err"); 20e64fe029SMartin Matuska } 21