diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-08 04:25:30 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-08 04:25:30 +0000 |
commit | 26f1d5c221a20e4c9858e6ab2ac0c2fed8fdbdd4 (patch) | |
tree | 56d8448080a67622474e76f86071049a7c7d1ae9 /testsuite | |
parent | Adding debian version 1.0~rc6-1. (diff) | |
download | zutils-26f1d5c221a20e4c9858e6ab2ac0c2fed8fdbdd4.tar.xz zutils-26f1d5c221a20e4c9858e6ab2ac0c2fed8fdbdd4.zip |
Merging upstream version 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 |