aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/cpio/test/test_option_z.c
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@FreeBSD.org>2009-04-17 04:04:57 +0000
committerTim Kientzle <kientzle@FreeBSD.org>2009-04-17 04:04:57 +0000
commitd46c56dcba7946516c681934203e80187783c73c (patch)
tree71b1033c9249ea051e5e93acaad8389233a40909 /usr.bin/cpio/test/test_option_z.c
parent5191e7b5522ada3d40e781a95944960d70b31086 (diff)
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
Notes
Notes: svn path=/head/; revision=191192
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 15337a4ca15b..20579120e785 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);
+ }
}
}