Files
src/cpio/test/test_extract_cpio_lz4.c
T
Martin Matuska eff4ff4791 Update vendor/libarchive to 3.7.7
Security fixes:
 #2364 tar: don't crash on truncated tar archives
 #2366 gzip: prevent a hang when processing a malformed gzip inside a gzip
 #2377 tar: fix two leaks in tar header parsing

Important bugfixes:
 #2096 rar5: report encrypted entries
 #2252 7-zip: read/write symlink paths as UTF-8
 #2360 tar: fix truncation of entry pathnames in specific archives

Obtained from:	libarchive
Vendor commit:	b439d586f53911c84be5e380445a8a259e19114c
2024-10-13 10:34:52 +02:00

30 lines
791 B
C

/*-
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c) 2012,2014 Michihiro NAKAJIMA
* All rights reserved.
*/
#include "test.h"
DEFINE_TEST(test_extract_cpio_lz4)
{
const char *reffile = "test_extract.cpio.lz4";
int f;
extract_reference_file(reffile);
f = systemf("%s -it < %s >test.out 2>test.err", testprog, reffile);
if (f == 0 || canLz4()) {
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 lz4 is not supported on this platform");
}
}