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 /* Ensure single-file zips work */ DEFINE_TEST(test_singlefile)10e64fe029SMartin MatuskaDEFINE_TEST(test_singlefile) 11e64fe029SMartin Matuska { 12e64fe029SMartin Matuska const char *reffile = "test_singlefile.zip"; 13e64fe029SMartin Matuska int r; 14e64fe029SMartin Matuska 15e64fe029SMartin Matuska extract_reference_file(reffile); 16e64fe029SMartin Matuska r = systemf("%s %s >test.out 2>test.err", testprog, reffile); 17e64fe029SMartin Matuska assertEqualInt(0, r); 18e64fe029SMartin Matuska assertNonEmptyFile("test.out"); 19e64fe029SMartin Matuska assertEmptyFile("test.err"); 20e64fe029SMartin Matuska 21e64fe029SMartin Matuska assertTextFileContents("hello\n", "file.txt"); 22e64fe029SMartin Matuska } 23