xref: /netbsd-src/external/bsd/libarchive/dist/cat/test/test_expand_mixed.c (revision c0434ef09f56837f124152afe51846c6e10f54bd)
140b1a6e6Sjoerg /*-
2*c0434ef0Schristos  * SPDX-License-Identifier: BSD-2-Clause
3*c0434ef0Schristos  *
440b1a6e6Sjoerg  * Copyright (c) 2014 Mike Kazantsev
540b1a6e6Sjoerg  * All rights reserved.
640b1a6e6Sjoerg  */
740b1a6e6Sjoerg #include "test.h"
840b1a6e6Sjoerg 
940b1a6e6Sjoerg DEFINE_TEST(test_expand_mixed)
1040b1a6e6Sjoerg {
1140b1a6e6Sjoerg 	const char *reffile1 = "test_expand.Z";
1240b1a6e6Sjoerg 	const char *reffile2 = "test_expand.plain";
1340b1a6e6Sjoerg 
1440b1a6e6Sjoerg 	extract_reference_file(reffile1);
1540b1a6e6Sjoerg 	extract_reference_file(reffile2);
1640b1a6e6Sjoerg 	assertEqualInt(0, systemf("%s %s %s >test.out 2>test.err",
1740b1a6e6Sjoerg 	    testprog, reffile1, reffile2));
1840b1a6e6Sjoerg 
1940b1a6e6Sjoerg 	assertTextFileContents(
2040b1a6e6Sjoerg 	    "contents of test_expand.Z.\n"
2140b1a6e6Sjoerg 	    "contents of test_expand.plain.\n", "test.out");
2240b1a6e6Sjoerg 	assertEmptyFile("test.err");
2340b1a6e6Sjoerg }
24