140b1a6e6Sjoerg /*- 2*c0434ef0Schristos * SPDX-License-Identifier: BSD-2-Clause 3*c0434ef0Schristos * 440b1a6e6Sjoerg * Copyright (c) 2014 Mike Kazantsev 540b1a6e6Sjoerg * Copyright (c) 2012 Michihiro NAKAJIMA 640b1a6e6Sjoerg * All rights reserved. 740b1a6e6Sjoerg */ 840b1a6e6Sjoerg #include "test.h" 940b1a6e6Sjoerg 1040b1a6e6Sjoerg DEFINE_TEST(test_expand_gz) 1140b1a6e6Sjoerg { 1240b1a6e6Sjoerg const char *reffile = "test_expand.gz"; 1340b1a6e6Sjoerg int f; 1440b1a6e6Sjoerg 1540b1a6e6Sjoerg extract_reference_file(reffile); 1640b1a6e6Sjoerg f = systemf("%s %s >test.out 2>test.err", testprog, reffile); 1740b1a6e6Sjoerg if (f == 0 || canGzip()) { 1840b1a6e6Sjoerg assertEqualInt(0, f); 1940b1a6e6Sjoerg assertTextFileContents("contents of test_expand.gz.\n", "test.out"); 2040b1a6e6Sjoerg assertEmptyFile("test.err"); 2140b1a6e6Sjoerg } else { 2240b1a6e6Sjoerg skipping("It seems gzip is not supported on this platform"); 2340b1a6e6Sjoerg } 2440b1a6e6Sjoerg } 25