diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-08 04:25:23 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-08 04:25:23 +0000 |
commit | 8566aaafaa90f4d8225628f26b5d394292165a57 (patch) | |
tree | c652849f0274c7b8d1a5103faf77dd040ae9d8ca /testsuite | |
parent | Adding upstream version 1.0~rc6. (diff) | |
download | zutils-8566aaafaa90f4d8225628f26b5d394292165a57.tar.xz zutils-8566aaafaa90f4d8225628f26b5d394292165a57.zip |
Adding upstream version 1.0~rc7.upstream/1.0_rc7
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/check.sh | 68 |
1 files changed, 41 insertions, 27 deletions
diff --git a/testsuite/check.sh b/testsuite/check.sh index 85217fc..2faa2b7 100755 --- a/testsuite/check.sh +++ b/testsuite/check.sh @@ -83,13 +83,13 @@ printf . cmp in6 copy6 || fail=1 printf . "${ZCAT}" --format=gz in.bz2 2> /dev/null -if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 1 ] ; then printf . ; else printf - ; fail=1 ; fi "${ZCAT}" --format=bz2 in.lz 2> /dev/null -if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 1 ] ; then printf . ; else printf - ; fail=1 ; fi "${ZCAT}" --format=lz in.gz 2> /dev/null -if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 1 ] ; then printf . ; else printf - ; fail=1 ; fi "${ZCAT}" --bad-option 2> /dev/null -if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 1 ] ; then printf . ; else printf - ; fail=1 ; fi printf "\ntesting zcmp-%s..." "$2" @@ -112,16 +112,16 @@ for i in ${extensions}; do done "${ZCMP}" in in6 2> /dev/null -if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 1 ] ; then printf . ; else printf - ; fail=1 ; fi "${ZCMP}" -n 0 in in6 || fail=1 "${ZCMP}" -n 100 in in6 || fail=1 "${ZCMP}" -n 1000 in in6 || fail=1 "${ZCMP}" -n 10000 in in6 || fail=1 printf . "${ZCMP}" in.tar pin.tar > /dev/null -if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 1 ] ; then printf . ; else printf - ; fail=1 ; fi "${ZCMP}" -i 0,11 in.tar pin.tar 2> /dev/null -if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 1 ] ; then printf . ; else printf - ; fail=1 ; fi "${ZCMP}" -i 0,11 -n 0 in.tar pin.tar || fail=1 "${ZCMP}" -i 0,11 -n 100 in.tar pin.tar || fail=1 "${ZCMP}" -i 0,11 -n 1000 in.tar pin.tar || fail=1 @@ -162,13 +162,13 @@ printf . "${ZCMP}" - in < in.lz || fail=1 printf . "${ZCMP}" -q --format=lz in.lz -if [ $? != 2 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi "${ZCMP}" --format=lz in.gz in.lz 2> /dev/null -if [ $? != 2 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi "${ZCMP}" -n -1 in in 2> /dev/null -if [ $? != 2 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi "${ZCMP}" --bad-option in in 2> /dev/null -if [ $? != 2 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi printf "\ntesting zdiff-%s..." "$2" @@ -187,9 +187,9 @@ for i in ${extensions}; do done "${ZDIFF}" in in6 > /dev/null -if [ $? = 0 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? != 0 ] ; then printf . ; else printf - ; fail=1 ; fi "${ZDIFF}" in.tar pin.tar > /dev/null -if [ $? = 0 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? != 0 ] ; then printf . ; else printf - ; fail=1 ; fi "${ZDIFF}" - || fail=1 printf . "${ZDIFF}" in in || fail=1 @@ -225,11 +225,11 @@ printf . "${ZDIFF}" - in < in.lz || fail=1 printf . "${ZDIFF}" -q --format=bz2 in.bz2 2> /dev/null -if [ $? != 2 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi "${ZDIFF}" -q --format=,lz in.lz in.bz2 > /dev/null 2> /dev/null -if [ $? != 2 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi "${ZDIFF}" --bad-option 2> /dev/null -if [ $? != 2 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi printf "\ntesting zgrep-%s..." "$2" @@ -237,14 +237,22 @@ printf "\ntesting zgrep-%s..." "$2" for i in ${extensions}; do "${ZGREP}" "GNU" in.$i > /dev/null || fail=1 printf . + "${ZGREP}" -l "GNU" in.$i > /dev/null || fail=1 + printf . + "${ZGREP}" -L "GNU" in.$i || fail=1 + printf . "${ZGREP}" --format=$i "GNU" in.$i > /dev/null || fail=1 printf . "${ZGREP}" -v "nx_pattern" in.$i > /dev/null || fail=1 printf . - "${ZGREP}" "nx_pattern" in.$i > /dev/null - if [ $? = 0 ] ; then fail=1 ; printf - ; else printf . ; fi + "${ZGREP}" "nx_pattern" in.$i + if [ $? != 0 ] ; then printf . ; else printf - ; fail=1 ; fi + "${ZGREP}" -l "nx_pattern" in.$i + if [ $? != 0 ] ; then printf . ; else printf - ; fail=1 ; fi + "${ZGREP}" -L "nx_pattern" in.$i > /dev/null + if [ $? != 0 ] ; then printf . ; else printf - ; fail=1 ; fi "${ZGREP}" --format=$i "GNU" in 2> /dev/null - if [ $? != 2 ] ; then fail=1 ; printf - ; else printf . ; fi + if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi done "${ZGREP}" "GNU" < pin.tar > /dev/null || fail=1 @@ -254,7 +262,7 @@ printf . "${ZGREP}" -r "GNU" . > /dev/null || fail=1 printf . "${ZGREP}" "nx_pattern" -r . in > /dev/null -if [ $? = 0 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? != 0 ] ; then printf . ; else printf - ; fail=1 ; fi "${ZGREP}" "GNU" < in > /dev/null || fail=1 printf . "${ZGREP}" "GNU" < in.gz > /dev/null || fail=1 @@ -273,8 +281,14 @@ printf . printf . "${ZGREP}" -l "GNU" in in.gz in.bz2 in.lz -- -in- > /dev/null || fail=1 printf . +"${ZGREP}" -L "GNU" in in.gz in.bz2 in.lz -- -in- || fail=1 +printf . +"${ZGREP}" -l "nx_pattern" in in.gz in.bz2 in.lz -- -in- +if [ $? != 0 ] ; then printf . ; else printf - ; fail=1 ; fi +"${ZGREP}" -L "nx_pattern" in in.gz in.bz2 in.lz -- -in- > /dev/null +if [ $? != 0 ] ; then printf . ; else printf - ; fail=1 ; fi "${ZGREP}" --bad-option 2> /dev/null -if [ $? != 2 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi "${ZEGREP}" "GNU" in > /dev/null || fail=1 printf . @@ -288,9 +302,9 @@ for i in ${extensions}; do "${ZTEST}" --format=$i < in.$i || fail=1 printf . "${ZTEST}" --format=$i < in 2> /dev/null - if [ $? != 2 ] ; then fail=1 ; printf - ; else printf . ; fi + if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi "${ZTEST}" --format=$i in 2> /dev/null - if [ $? != 2 ] ; then fail=1 ; printf - ; else printf . ; fi + if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi done "${ZTEST}" in in.gz in.bz2 in.lz -- -in- || fail=1 @@ -304,13 +318,13 @@ printf . "${ZTEST}" -r . || fail=1 printf . "${ZTEST}" < in 2> /dev/null -if [ $? != 2 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi dd if=in.lz bs=1000 count=1 2> /dev/null | "${ZTEST}" -q -if [ $? != 2 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi "${ZTEST}" --format=lz in.bz2 2> /dev/null -if [ $? != 2 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi "${ZTEST}" --bad-option 2> /dev/null -if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 1 ] ; then printf . ; else printf - ; fail=1 ; fi echo if [ ${fail} = 0 ] ; then |