blob: 43f9dce1ce4bf27832154bd190b99209aa130dc0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2012 Michihiro NAKAJIMA
* All rights reserved.
*/
#include "test.h"
DEFINE_TEST(test_extract_cpio_lzo)
{
const char *reffile = "test_extract.cpio.lzo";
int f;
extract_reference_file(reffile);
f = systemf("%s -it < %s >test.out 2>test.err", testprog, reffile);
if (f == 0 || canLzop()) {
assertEqualInt(0, systemf("%s -i < %s >test.out 2>test.err",
testprog, reffile));
assertFileExists("file1");
assertTextFileContents("contents of file1.\n", "file1");
assertFileExists("file2");
assertTextFileContents("contents of file2.\n", "file2");
assertEmptyFile("test.out");
assertTextFileContents("1 block\n", "test.err");
} else {
skipping("It seems lzop is not supported on this platform");
}
}
|