summaryrefslogtreecommitdiffstats
path: root/usr.bin/cpio/test/test_option_z.c
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2009-04-17 04:04:57 +0000
committerkientzle <kientzle@FreeBSD.org>2009-04-17 04:04:57 +0000
commit5853643ce6ecab17fd51492c41fe5a44599637b2 (patch)
tree71b1033c9249ea051e5e93acaad8389233a40909 /usr.bin/cpio/test/test_option_z.c
parent4e8cb50d8bef897f785cb884230eb42be06c0541 (diff)
downloadFreeBSD-src-5853643ce6ecab17fd51492c41fe5a44599637b2.zip
FreeBSD-src-5853643ce6ecab17fd51492c41fe5a44599637b2.tar.gz
Merge from libarchive.googlecode.com:
* Lots of new tests. * New -n / --numeric-uid-gid option * More sanity-checking of arguments * Various Windows portability improvements * Sync up version number to 2.7.0
Diffstat (limited to 'usr.bin/cpio/test/test_option_z.c')
-rw-r--r--usr.bin/cpio/test/test_option_z.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/usr.bin/cpio/test/test_option_z.c b/usr.bin/cpio/test/test_option_z.c
index 15337a4..2057912 100644
--- a/usr.bin/cpio/test/test_option_z.c
+++ b/usr.bin/cpio/test/test_option_z.c
@@ -44,9 +44,16 @@ DEFINE_TEST(test_option_z)
failure("-z option seems to be broken");
assertEqualInt(r, 0);
if (r == 0) {
- /* Check that the archive file has a gzip signature. */
- p = slurpfile(&s, "archive.out");
- assert(s > 2);
- assertEqualMem(p, "\x1f\x8b\x08\x00", 4);
+ p = slurpfile(&s, "archive.err");
+ p[s] = '\0';
+ if (strstr(p, "gzip compression not supported") != NULL) {
+ skipping("This version of bsdcpio was compiled "
+ "without gzip support");
+ } else {
+ /* Check that the archive file has a gzip signature. */
+ p = slurpfile(&s, "archive.out");
+ assert(s > 2);
+ assertEqualMem(p, "\x1f\x8b\x08\x00", 4);
+ }
}
}
OpenPOWER on IntegriCloud