diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-08 04:26:51 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-08 04:26:51 +0000 |
commit | abdd6f5dd4e9b01f68646858e3abc58325436be3 (patch) | |
tree | 7d78c505a87aed973c3154a810d57feb259b69a6 /testsuite | |
parent | Adding upstream version 1.0. (diff) | |
download | zutils-abdd6f5dd4e9b01f68646858e3abc58325436be3.tar.xz zutils-abdd6f5dd4e9b01f68646858e3abc58325436be3.zip |
Adding upstream version 1.1~rc2.upstream/1.1_rc2
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/check.sh | 253 |
1 files changed, 133 insertions, 120 deletions
diff --git a/testsuite/check.sh b/testsuite/check.sh index 2faa2b7..fe8dbff 100755 --- a/testsuite/check.sh +++ b/testsuite/check.sh @@ -50,280 +50,293 @@ printf "testing zutils-%s..." "$2" printf "\ntesting zcat-%s..." "$2" for i in ${extensions}; do - "${ZCAT}" in.$i > copy || fail=1 + "${ZCAT}" -N in.$i > copy || fail=1 cmp in copy || fail=1 printf . - "${ZCAT}" --format=$i in.$i > copy || fail=1 + "${ZCAT}" -N --format=$i in.$i > copy || fail=1 cmp in copy || fail=1 printf . - "${ZCAT}" in.$i | dd bs=1000 count=1 > copy 2> /dev/null || fail=1 + "${ZCAT}" -N in.$i | dd bs=1000 count=1 > copy 2> /dev/null || fail=1 dd if=in bs=1000 count=1 2> /dev/null | cmp - copy || fail=1 printf . done -"${ZCAT}" < in > copy || fail=1 +"${ZCAT}" -N < in > copy || fail=1 cmp in copy || fail=1 printf . -"${ZCAT}" < in.gz > copy || fail=1 +"${ZCAT}" -N < in.gz > copy || fail=1 cmp in copy || fail=1 printf . -"${ZCAT}" < in.bz2 > copy || fail=1 +"${ZCAT}" -N < in.bz2 > copy || fail=1 cmp in copy || fail=1 printf . -"${ZCAT}" < in.lz > copy || fail=1 +"${ZCAT}" -N < in.lz > copy || fail=1 cmp in copy || fail=1 printf . -"${ZCAT}" in > copy || fail=1 +"${ZCAT}" -N --lz='lzip -q' < in.lz > copy || fail=1 cmp in copy || fail=1 printf . -"${ZCAT}" lz_only > copy || fail=1 +"${ZCAT}" -N in > copy || fail=1 cmp in copy || fail=1 printf . -"${ZCAT}" in in.gz in.bz2 in.lz -- -in- -in-.lz > copy6 || fail=1 +"${ZCAT}" -N lz_only > copy || fail=1 +cmp in copy || fail=1 +printf . +"${ZCAT}" -N in in.gz in.bz2 in.lz -- -in- -in-.lz > copy6 || fail=1 cmp in6 copy6 || fail=1 printf . -"${ZCAT}" --format=gz in.bz2 2> /dev/null +"${ZCAT}" -N --format=gz in.bz2 2> /dev/null if [ $? = 1 ] ; then printf . ; else printf - ; fail=1 ; fi -"${ZCAT}" --format=bz2 in.lz 2> /dev/null +"${ZCAT}" -N --format=bz2 in.lz 2> /dev/null if [ $? = 1 ] ; then printf . ; else printf - ; fail=1 ; fi -"${ZCAT}" --format=lz in.gz 2> /dev/null +"${ZCAT}" -N --format=lz in.gz 2> /dev/null if [ $? = 1 ] ; then printf . ; else printf - ; fail=1 ; fi -"${ZCAT}" --bad-option 2> /dev/null +"${ZCAT}" -N --bad-option 2> /dev/null if [ $? = 1 ] ; then printf . ; else printf - ; fail=1 ; fi printf "\ntesting zcmp-%s..." "$2" for i in ${extensions}; do - "${ZCMP}" in.$i || fail=1 + "${ZCMP}" -N in.$i || fail=1 printf . - "${ZCMP}" in in.$i || fail=1 + "${ZCMP}" -N in in.$i || fail=1 printf . - "${ZCMP}" -i 100 -n 500 in6 in.$i || fail=1 + "${ZCMP}" -N -i 100 -n 500 in6 in.$i || fail=1 printf . - "${ZCMP}" in in.$i --format=,$i || fail=1 + "${ZCMP}" -N in in.$i --format=,$i || fail=1 printf . - "${ZCMP}" in.$i in || fail=1 + "${ZCMP}" -N in.$i in || fail=1 printf . - "${ZCMP}" -i 1000:1000 -n 50 in.$i in6 || fail=1 + "${ZCMP}" -N -i 1000:1000 -n 50 in.$i in6 || fail=1 printf . - "${ZCMP}" in.$i in --format=$i || fail=1 + "${ZCMP}" -N in.$i in --format=$i || fail=1 printf . done -"${ZCMP}" in in6 2> /dev/null +"${ZCMP}" -N in in6 2> /dev/null 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 +"${ZCMP}" -N -n 0 in in6 || fail=1 +"${ZCMP}" -N -n 100 in in6 || fail=1 +"${ZCMP}" -N -n 1000 in in6 || fail=1 +"${ZCMP}" -N -n 10000 in in6 || fail=1 printf . -"${ZCMP}" in.tar pin.tar > /dev/null +"${ZCMP}" -N in.tar pin.tar > /dev/null if [ $? = 1 ] ; then printf . ; else printf - ; fail=1 ; fi -"${ZCMP}" -i 0,11 in.tar pin.tar 2> /dev/null +"${ZCMP}" -N -i 0,11 in.tar pin.tar 2> /dev/null 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 -"${ZCMP}" -i 0,11 -n 10000 in.tar pin.tar || fail=1 +"${ZCMP}" -N -i 0,11 -n 0 in.tar pin.tar || fail=1 +"${ZCMP}" -N -i 0,11 -n 100 in.tar pin.tar || fail=1 +"${ZCMP}" -N -i 0,11 -n 1000 in.tar pin.tar || fail=1 +"${ZCMP}" -N -i 0,11 -n 10000 in.tar pin.tar || fail=1 printf . -"${ZCMP}" - || fail=1 +"${ZCMP}" -N - || fail=1 printf . -"${ZCMP}" in in || fail=1 +"${ZCMP}" -N in in || fail=1 printf . -"${ZCMP}" in || fail=1 +"${ZCMP}" -N in || fail=1 printf . -"${ZCMP}" in.lz in.gz || fail=1 +"${ZCMP}" -N in.lz in.gz || fail=1 printf . -"${ZCMP}" in.gz -- -in-.lz || fail=1 +"${ZCMP}" -N --lz='lzip -q' in.lz in.gz || fail=1 printf . -"${ZCMP}" -- -in-.lz in.gz || fail=1 +"${ZCMP}" -N in.gz -- -in-.lz || fail=1 printf . -"${ZCMP}" in -- -in-.lz || fail=1 +"${ZCMP}" -N -- -in-.lz in.gz || fail=1 printf . -"${ZCMP}" -- -in- in.lz || fail=1 +"${ZCMP}" -N in -- -in-.lz || fail=1 printf . -"${ZCMP}" in.lz -- -in- || fail=1 +"${ZCMP}" -N -- -in- in.lz || fail=1 printf . -"${ZCMP}" -- -in-.lz in || fail=1 +"${ZCMP}" -N in.lz -- -in- || fail=1 printf . -"${ZCMP}" -- -in- in || fail=1 +"${ZCMP}" -N -- -in-.lz in || fail=1 printf . -"${ZCMP}" in -- -in- || fail=1 +"${ZCMP}" -N -- -in- in || fail=1 printf . -"${ZCMP}" lz_only.lz < in || fail=1 +"${ZCMP}" -N in -- -in- || fail=1 printf . -"${ZCMP}" in.lz - < in || fail=1 +"${ZCMP}" -N lz_only.lz < in || fail=1 printf . -"${ZCMP}" - in.lz < in || fail=1 +"${ZCMP}" -N in.lz - < in || fail=1 printf . -"${ZCMP}" in - < in.lz || fail=1 +"${ZCMP}" -N - in.lz < in || fail=1 printf . -"${ZCMP}" - in < in.lz || fail=1 +"${ZCMP}" -N in - < in.lz || fail=1 printf . -"${ZCMP}" -q --format=lz in.lz +"${ZCMP}" -N - in < in.lz || fail=1 +printf . +"${ZCMP}" -N -q --format=lz in.lz if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi -"${ZCMP}" --format=lz in.gz in.lz 2> /dev/null +"${ZCMP}" -N --format=lz in.gz in.lz 2> /dev/null if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi -"${ZCMP}" -n -1 in in 2> /dev/null +"${ZCMP}" -N -n -1 in in 2> /dev/null if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi -"${ZCMP}" --bad-option in in 2> /dev/null +"${ZCMP}" -N --bad-option in in 2> /dev/null if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi printf "\ntesting zdiff-%s..." "$2" for i in ${extensions}; do - "${ZDIFF}" in.$i || fail=1 + "${ZDIFF}" -N in.$i > /dev/null || fail=1 printf . - "${ZDIFF}" in in.$i || fail=1 + "${ZDIFF}" -N in in.$i > /dev/null || fail=1 printf . - "${ZDIFF}" --format=,$i in in.$i || fail=1 + "${ZDIFF}" -N --format=,$i in in.$i > /dev/null || fail=1 printf . - "${ZDIFF}" in.$i in || fail=1 + "${ZDIFF}" -N in.$i in > /dev/null || fail=1 printf . - "${ZDIFF}" --format=$i, in.$i in || fail=1 + "${ZDIFF}" -N --format=$i, in.$i in > /dev/null || fail=1 printf . done -"${ZDIFF}" in in6 > /dev/null +"${ZDIFF}" -N in in6 > /dev/null if [ $? != 0 ] ; then printf . ; else printf - ; fail=1 ; fi -"${ZDIFF}" in.tar pin.tar > /dev/null +"${ZDIFF}" -N in.tar pin.tar > /dev/null if [ $? != 0 ] ; then printf . ; else printf - ; fail=1 ; fi -"${ZDIFF}" - || fail=1 +"${ZDIFF}" -N - || fail=1 +printf . +"${ZDIFF}" -N in in || fail=1 printf . -"${ZDIFF}" in in || fail=1 +"${ZDIFF}" -N in > /dev/null || fail=1 printf . -"${ZDIFF}" in || fail=1 +"${ZDIFF}" -N in.lz in.gz > /dev/null || fail=1 printf . -"${ZDIFF}" in.lz in.gz || fail=1 +"${ZDIFF}" -N --lz='lzip -q' in.lz in.gz > /dev/null || fail=1 printf . -"${ZDIFF}" in.gz -- -in-.lz || fail=1 +"${ZDIFF}" -N in.gz -- -in-.lz > /dev/null || fail=1 printf . -"${ZDIFF}" -- -in-.lz in.gz || fail=1 +"${ZDIFF}" -N -- -in-.lz in.gz > /dev/null || fail=1 printf . -"${ZDIFF}" in -- -in-.lz || fail=1 +"${ZDIFF}" -N in -- -in-.lz > /dev/null || fail=1 printf . -"${ZDIFF}" -- -in- in.lz || fail=1 +"${ZDIFF}" -N -- -in- in.lz > /dev/null || fail=1 printf . -"${ZDIFF}" in.lz -- -in- || fail=1 +"${ZDIFF}" -N in.lz -- -in- > /dev/null || fail=1 printf . -"${ZDIFF}" -- -in-.lz in || fail=1 +"${ZDIFF}" -N -- -in-.lz in > /dev/null || fail=1 printf . -"${ZDIFF}" -- -in- in || fail=1 +"${ZDIFF}" -N -- -in- in > /dev/null || fail=1 printf . -"${ZDIFF}" in -- -in- || fail=1 +"${ZDIFF}" -N in -- -in- > /dev/null || fail=1 printf . -"${ZDIFF}" lz_only.lz < in || fail=1 +"${ZDIFF}" -N lz_only.lz < in > /dev/null || fail=1 printf . -"${ZDIFF}" in.lz - < in || fail=1 +"${ZDIFF}" -N in.lz - < in > /dev/null || fail=1 printf . -"${ZDIFF}" - in.lz < in || fail=1 +"${ZDIFF}" -N - in.lz < in > /dev/null || fail=1 printf . -"${ZDIFF}" in - < in.lz || fail=1 +"${ZDIFF}" -N in - < in.lz > /dev/null || fail=1 printf . -"${ZDIFF}" - in < in.lz || fail=1 +"${ZDIFF}" -N - in < in.lz > /dev/null || fail=1 printf . -"${ZDIFF}" -q --format=bz2 in.bz2 2> /dev/null +"${ZDIFF}" -N -q --format=bz2 in.bz2 2> /dev/null if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi -"${ZDIFF}" -q --format=,lz in.lz in.bz2 > /dev/null 2> /dev/null +"${ZDIFF}" -N -q --format=,lz in.lz in.bz2 > /dev/null 2> /dev/null if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi -"${ZDIFF}" --bad-option 2> /dev/null +"${ZDIFF}" -N --bad-option 2> /dev/null if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi printf "\ntesting zgrep-%s..." "$2" for i in ${extensions}; do - "${ZGREP}" "GNU" in.$i > /dev/null || fail=1 + "${ZGREP}" -N "GNU" in.$i > /dev/null || fail=1 printf . - "${ZGREP}" -l "GNU" in.$i > /dev/null || fail=1 + "${ZGREP}" -N -l "GNU" in.$i > /dev/null || fail=1 printf . - "${ZGREP}" -L "GNU" in.$i || fail=1 + "${ZGREP}" -N -L "GNU" in.$i || fail=1 printf . - "${ZGREP}" --format=$i "GNU" in.$i > /dev/null || fail=1 + "${ZGREP}" -N --format=$i "GNU" in.$i > /dev/null || fail=1 printf . - "${ZGREP}" -v "nx_pattern" in.$i > /dev/null || fail=1 + "${ZGREP}" -N -v "nx_pattern" in.$i > /dev/null || fail=1 printf . - "${ZGREP}" "nx_pattern" in.$i + "${ZGREP}" -N "nx_pattern" in.$i if [ $? != 0 ] ; then printf . ; else printf - ; fail=1 ; fi - "${ZGREP}" -l "nx_pattern" in.$i + "${ZGREP}" -N -l "nx_pattern" in.$i if [ $? != 0 ] ; then printf . ; else printf - ; fail=1 ; fi - "${ZGREP}" -L "nx_pattern" in.$i > /dev/null + "${ZGREP}" -N -L "nx_pattern" in.$i > /dev/null if [ $? != 0 ] ; then printf . ; else printf - ; fail=1 ; fi - "${ZGREP}" --format=$i "GNU" in 2> /dev/null + "${ZGREP}" -N --format=$i "GNU" in 2> /dev/null if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi done -"${ZGREP}" "GNU" < pin.tar > /dev/null || fail=1 +"${ZGREP}" -N "GNU" < pin.tar > /dev/null || fail=1 printf . -"${ZGREP}" "GNU" pin.tar > /dev/null || fail=1 +"${ZGREP}" -N "GNU" pin.tar > /dev/null || fail=1 printf . -"${ZGREP}" -r "GNU" . > /dev/null || fail=1 +"${ZGREP}" -N -r "GNU" . > /dev/null || fail=1 printf . -"${ZGREP}" "nx_pattern" -r . in > /dev/null +"${ZGREP}" -N "nx_pattern" -r . in > /dev/null if [ $? != 0 ] ; then printf . ; else printf - ; fail=1 ; fi -"${ZGREP}" "GNU" < in > /dev/null || fail=1 +"${ZGREP}" -N "GNU" < in > /dev/null || fail=1 printf . -"${ZGREP}" "GNU" < in.gz > /dev/null || fail=1 +"${ZGREP}" -N "GNU" < in.gz > /dev/null || fail=1 printf . -"${ZGREP}" "GNU" < in.bz2 > /dev/null || fail=1 +"${ZGREP}" -N "GNU" < in.bz2 > /dev/null || fail=1 printf . -"${ZGREP}" "GNU" < in.lz > /dev/null || fail=1 +"${ZGREP}" -N "GNU" < in.lz > /dev/null || fail=1 printf . -"${ZGREP}" "GNU" in > /dev/null || fail=1 +"${ZGREP}" -N "GNU" --lz='lzip -q' < in.lz > /dev/null || fail=1 printf . -"${ZGREP}" "GNU" -- -in- > /dev/null || fail=1 +"${ZGREP}" -N "GNU" in > /dev/null || fail=1 printf . -"${ZGREP}" "GNU" -- -in-.lz > /dev/null || fail=1 +"${ZGREP}" -N "GNU" -- -in- > /dev/null || fail=1 printf . -"${ZGREP}" "GNU" in in.gz in.bz2 in.lz -- -in- > /dev/null || fail=1 +"${ZGREP}" -N "GNU" -- -in-.lz > /dev/null || fail=1 printf . -"${ZGREP}" -l "GNU" in in.gz in.bz2 in.lz -- -in- > /dev/null || fail=1 +"${ZGREP}" -N "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 +"${ZGREP}" -N -l "GNU" in in.gz in.bz2 in.lz -- -in- > /dev/null || fail=1 printf . -"${ZGREP}" -l "nx_pattern" in in.gz in.bz2 in.lz -- -in- +"${ZGREP}" -N -L "GNU" in in.gz in.bz2 in.lz -- -in- || fail=1 +printf . +"${ZGREP}" -N -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 +"${ZGREP}" -N -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 +"${ZGREP}" -N --bad-option 2> /dev/null if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi -"${ZEGREP}" "GNU" in > /dev/null || fail=1 +"${ZEGREP}" -N "GNU" in > /dev/null || fail=1 printf . -"${ZFGREP}" "GNU" in > /dev/null || fail=1 +"${ZFGREP}" -N "GNU" in > /dev/null || fail=1 printf . printf "\ntesting ztest-%s..." "$2" for i in ${extensions}; do - "${ZTEST}" --format=$i < in.$i || fail=1 + "${ZTEST}" -N --format=$i < in.$i || fail=1 printf . - "${ZTEST}" --format=$i < in 2> /dev/null + "${ZTEST}" -N --format=$i < in 2> /dev/null if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi - "${ZTEST}" --format=$i in 2> /dev/null + "${ZTEST}" -N --format=$i in 2> /dev/null if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi done -"${ZTEST}" in in.gz in.bz2 in.lz -- -in- || fail=1 +"${ZTEST}" -N in in.gz in.bz2 in.lz -- -in- || fail=1 +printf . +"${ZTEST}" -N < in.gz || fail=1 printf . -"${ZTEST}" < in.gz || fail=1 +"${ZTEST}" -N < in.bz2 || fail=1 printf . -"${ZTEST}" < in.bz2 || fail=1 +"${ZTEST}" -N < in.lz || fail=1 printf . -"${ZTEST}" < in.lz || fail=1 +"${ZTEST}" -N --lz='lzip -q' < in.lz || fail=1 printf . -"${ZTEST}" -r . || fail=1 +"${ZTEST}" -N -r . || fail=1 printf . -"${ZTEST}" < in 2> /dev/null +"${ZTEST}" -N < in 2> /dev/null +if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi +dd if=in.lz bs=1000 count=1 2> /dev/null | "${ZTEST}" -N -q if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi -dd if=in.lz bs=1000 count=1 2> /dev/null | "${ZTEST}" -q +"${ZTEST}" -N --format=lz in.bz2 2> /dev/null if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi -"${ZTEST}" --format=lz in.bz2 2> /dev/null +"${ZTEST}" -N --lz='lzip --bad-option' in.lz 2> /dev/null if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi -"${ZTEST}" --bad-option 2> /dev/null +"${ZTEST}" -N --bad-option 2> /dev/null if [ $? = 1 ] ; then printf . ; else printf - ; fail=1 ; fi echo |