xref: /freebsd/contrib/libarchive/tar/test/test_extract_tar_Z.c (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1 /*-
2  * SPDX-License-Identifier: BSD-2-Clause
3  *
4  * Copyright (c) 2012 Michihiro NAKAJIMA
5  * All rights reserved.
6  */
7 #include "test.h"
8 
9 DEFINE_TEST(test_extract_tar_Z)
10 {
11 	const char *reffile = "test_extract.tar.Z";
12 
13 	extract_reference_file(reffile);
14 	assertEqualInt(0, systemf("%s -xf %s >test.out 2>test.err",
15 	    testprog, reffile));
16 
17 	assertFileExists("file1");
18 	assertTextFileContents("contents of file1.\n", "file1");
19 	assertFileExists("file2");
20 	assertTextFileContents("contents of file2.\n", "file2");
21 	assertEmptyFile("test.out");
22 	assertEmptyFile("test.err");
23 }
24