summaryrefslogtreecommitdiffstats
path: root/testsuite/check.sh
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/check.sh')
-rwxr-xr-xtestsuite/check.sh16
1 files changed, 9 insertions, 7 deletions
diff --git a/testsuite/check.sh b/testsuite/check.sh
index 6a6ef38..b97abd7 100755
--- a/testsuite/check.sh
+++ b/testsuite/check.sh
@@ -1,6 +1,6 @@
#! /bin/sh
# check script for Zutils - Utilities dealing with compressed files
-# Copyright (C) 2009-2021 Antonio Diaz Diaz.
+# Copyright (C) 2009-2022 Antonio Diaz Diaz.
#
# This script is free software: you have unlimited permission
# to copy, distribute, and modify it.
@@ -194,8 +194,7 @@ done
"${ZCMP}" -Nq --force-format=lz in.lz
[ $? = 2 ] || test_failed $LINENO
"${ZCMP}" -Nq --force-format=lz in.gz in.lz
-r=$?
-{ [ $r = 1 ] || [ $r = 2 ] ; } || test_failed $LINENO
+[ $? = 2 ] || test_failed $LINENO
"${ZCMP}" -Nq -i 100BB in in
[ $? = 2 ] || test_failed $LINENO
"${ZCMP}" -Nq -i 100BB:100 in in
@@ -206,6 +205,8 @@ r=$?
[ $? = 2 ] || test_failed $LINENO
"${ZCMP}" -N -q -n 100BB in in
[ $? = 2 ] || test_failed $LINENO
+"${ZCMP}" -Nq --gz=bad-gzip in.gz in.lz
+[ $? = 2 ] || test_failed $LINENO
"${ZCMP}" -N --bad-option in in 2> /dev/null
[ $? = 2 ] || test_failed $LINENO
@@ -255,11 +256,12 @@ done
[ $? = 2 ] || test_failed $LINENO
"${ZDIFF}" -N --bz2='-bzip2' in.bz2 2> /dev/null
[ $? = 2 ] || test_failed $LINENO
-"${ZDIFF}" -Nq --force-format=bz2 in.bz2 2> /dev/null
+"${ZDIFF}" -N --brief --force-format=bz2 in.bz2 2> /dev/null
+[ $? = 2 ] || test_failed $LINENO
+"${ZDIFF}" -N --brief --force-format=,lz in.lz in.bz2 > /dev/null 2>&1
+[ $? = 2 ] || test_failed $LINENO
+"${ZDIFF}" -N --brief --gz=bad-gzip in.gz in.lz > /dev/null 2>&1
[ $? = 2 ] || test_failed $LINENO
-"${ZDIFF}" -N -q --force-format=,lz in.lz in.bz2 > /dev/null 2>&1
-r=$?
-{ [ $r = 1 ] || [ $r = 2 ] ; } || test_failed $LINENO
"${ZDIFF}" -N --bad-option 2> /dev/null
[ $? = 2 ] || test_failed $LINENO