1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 3 * 4 * Copyright (c) 2014 Mike Kazantsev 5 * Copyright (c) 2012 Michihiro NAKAJIMA 6 * All rights reserved. 7 */ 8 #include "test.h" 9 10 DEFINE_TEST(test_expand_gz) 11 { 12 const char *reffile = "test_expand.gz"; 13 int f; 14 15 extract_reference_file(reffile); 16 f = systemf("%s %s >test.out 2>test.err", testprog, reffile); 17 if (f == 0 || canGzip()) { 18 assertEqualInt(0, f); 19 assertTextFileContents("contents of test_expand.gz.\n", "test.out"); 20 assertEmptyFile("test.err"); 21 } else { 22 skipping("It seems gzip is not supported on this platform"); 23 } 24 } 25