test_expand_lz4.c 589 B

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