xref: /freebsd/contrib/libarchive/cat/test/test_expand_zstd.c (revision 5036d9652a5701d00e9e40ea942c278e9f77d33d)
1 /*-
2  * SPDX-License-Identifier: BSD-2-Clause
3  *
4  * Copyright (c) 2017 Sean Purcell
5  * All rights reserved.
6  */
7 #include "test.h"
8 
9 DEFINE_TEST(test_expand_zstd)
10 {
11 	const char *reffile = "test_expand.zst";
12 	int f;
13 
14 	extract_reference_file(reffile);
15 	f = systemf("%s %s >test.out 2>test.err", testprog, reffile);
16 	if (f == 0 || canZstd()) {
17 		assertEqualInt(0, f);
18 		assertTextFileContents("contents of test_expand.zst.\n", "test.out");
19 		assertEmptyFile("test.err");
20 	} else {
21 		skipping("It seems zstd is not supported on this platform");
22 	}
23 }
24