X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=tests%2Fzdiff;fp=tests%2Fzdiff;h=baa827fb0a1e9c993d98b61d504dd950f5155244;hb=a8a88eddaa90432e6ec1b8d9d5c9842bc91afd1d;hp=0bb7c7dfdcf93ecd2614521a941a962871465907;hpb=20fcfc81ece044b8b0a6768ec6cf47be4e22a2e6;p=debian%2Fgzip
diff --git a/tests/zdiff b/tests/zdiff
index 0bb7c7d..baa827f 100755
--- a/tests/zdiff
+++ b/tests/zdiff
@@ -2,7 +2,7 @@
# Exercise zdiff with two compressed inputs.
# Before gzip-1.4, this would fail.
-# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+# Copyright (C) 2009-2018 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,14 +15,13 @@
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
+# along with this program. If not, see .
# limit so don't run it by default.
. "${srcdir=.}/init.sh"; path_prepend_ ..
echo a > a || framework_failure_
echo b > b || framework_failure_
-gzip a b || framework_failure_
cat < exp
1c1
@@ -31,9 +30,11 @@ cat < exp
> b
EOF
+diff a b | diff exp - || skip_ "diff output format is incompatible with POSIX"
+
fail=0
-zdiff a.gz b.gz > out 2>&1
-test $? = 1 || fail=1
+gzip a b || fail=1
+returns_ 1 zdiff a.gz b.gz > out 2>&1 || fail=1
compare exp out || fail=1