diff options
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/check.sh | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/testsuite/check.sh b/testsuite/check.sh index 038c76d..0244c58 100755 --- a/testsuite/check.sh +++ b/testsuite/check.sh @@ -30,25 +30,28 @@ fail=0 printf "testing lzlib-%s..." "$2" "${LZIP}" -cqm4 in > /dev/null -if [ $? = 1 ] ; then printf . ; else fail=1 ; printf - ; fi +if [ $? = 1 ] ; then printf . ; else printf - ; fail=1 ; fi "${LZIP}" -cqm274 in > /dev/null -if [ $? = 1 ] ; then printf . ; else fail=1 ; printf - ; fi +if [ $? = 1 ] ; then printf . ; else printf - ; fail=1 ; fi "${LZIP}" -cqs-1 in > /dev/null -if [ $? = 1 ] ; then printf . ; else fail=1 ; printf - ; fi +if [ $? = 1 ] ; then printf . ; else printf - ; fail=1 ; fi "${LZIP}" -cqs0 in > /dev/null -if [ $? = 1 ] ; then printf . ; else fail=1 ; printf - ; fi +if [ $? = 1 ] ; then printf . ; else printf - ; fail=1 ; fi "${LZIP}" -cqs4095 in > /dev/null -if [ $? = 1 ] ; then printf . ; else fail=1 ; printf - ; fi +if [ $? = 1 ] ; then printf . ; else printf - ; fail=1 ; fi "${LZIP}" -cqs513MiB in > /dev/null -if [ $? = 1 ] ; then printf . ; else fail=1 ; printf - ; fi -"${LZIP}" -tq in -if [ $? = 2 ] ; then printf . ; else fail=1 ; printf - ; fi -"${LZIP}" -tq < in -if [ $? = 2 ] ; then printf . ; else fail=1 ; printf - ; fi +if [ $? = 1 ] ; then printf . ; else printf - ; fail=1 ; fi +printf " in: Bad magic number (file not in lzip format).\n" > msg +"${LZIP}" -t in 2> out +if [ $? = 2 ] && cmp out msg ; then printf . ; else printf - ; fail=1 ; fi +printf " (stdin): Bad magic number (file not in lzip format).\n" > msg +"${LZIP}" -t < in 2> out +if [ $? = 2 ] && cmp out msg ; then printf . ; else printf - ; fail=1 ; fi +rm -f out msg "${LZIP}" -cdq in -if [ $? = 2 ] ; then printf . ; else fail=1 ; printf - ; fi +if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi "${LZIP}" -cdq < in -if [ $? = 2 ] ; then printf . ; else fail=1 ; printf - ; fi +if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi dd if="${in_lz}" bs=1 count=6 2> /dev/null | "${LZIP}" -tq if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi dd if="${in_lz}" bs=1 count=20 2> /dev/null | "${LZIP}" -tq @@ -65,7 +68,7 @@ cmp in copy || fail=1 printf . "${LZIP}" -cfq "${in_lz}" > out -if [ $? = 1 ] ; then printf . ; else fail=1 ; printf - ; fi +if [ $? = 1 ] ; then printf . ; else printf - ; fail=1 ; fi "${LZIP}" -cF -s16 "${in_lz}" > out || fail=1 "${LZIP}" -cd out | "${LZIP}" -d > copy || fail=1 cmp in copy || fail=1 |