summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 14:03:45 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 14:03:45 +0000
commit8e588bc047fbb5af60a8eb44f5e5715f035888fc (patch)
treecd40dee12f5e790ea1540b9151e2354b14c092ba /testsuite
parentAdding upstream version 1.6~pre3. (diff)
downloadlzlib-8e588bc047fbb5af60a8eb44f5e5715f035888fc.tar.xz
lzlib-8e588bc047fbb5af60a8eb44f5e5715f035888fc.zip
Adding upstream version 1.6~pre4.upstream/1.6_pre4
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/check.sh29
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