15c831a5bSMartin Matuska /*- 2*bd66c1b4SMartin Matuska * SPDX-License-Identifier: BSD-2-Clause 3*bd66c1b4SMartin Matuska * 45c831a5bSMartin Matuska * Copyright (c) 2017 Sean Purcell 55c831a5bSMartin Matuska * All rights reserved. 65c831a5bSMartin Matuska */ 75c831a5bSMartin Matuska #include "test.h" 85c831a5bSMartin Matuska DEFINE_TEST(test_empty_zstd)95c831a5bSMartin MatuskaDEFINE_TEST(test_empty_zstd) 105c831a5bSMartin Matuska { 115c831a5bSMartin Matuska const char *reffile = "test_empty.zst"; 125c831a5bSMartin Matuska int f; 135c831a5bSMartin Matuska 145c831a5bSMartin Matuska extract_reference_file(reffile); 155c831a5bSMartin Matuska f = systemf("%s %s >test.out 2>test.err", testprog, reffile); 165c831a5bSMartin Matuska if (f == 0 || canZstd()) { 175c831a5bSMartin Matuska assertEqualInt(0, f); 185c831a5bSMartin Matuska assertEmptyFile("test.out"); 195c831a5bSMartin Matuska assertEmptyFile("test.err"); 205c831a5bSMartin Matuska } else { 215c831a5bSMartin Matuska skipping("It seems zstd is not supported on this platform"); 225c831a5bSMartin Matuska } 235c831a5bSMartin Matuska } 24