diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 15:35:26 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 15:35:26 +0000 |
commit | 391094ed961d742f431fdd89268274fc0bb52742 (patch) | |
tree | 2c77736ca41f43b00efe94400cfa5f9d9a431e76 /testsuite/check.sh | |
parent | Adding debian version 1.0-2. (diff) | |
download | plzip-391094ed961d742f431fdd89268274fc0bb52742.tar.xz plzip-391094ed961d742f431fdd89268274fc0bb52742.zip |
Merging upstream version 1.1~pre1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'testsuite/check.sh')
-rwxr-xr-x | testsuite/check.sh | 45 |
1 files changed, 26 insertions, 19 deletions
diff --git a/testsuite/check.sh b/testsuite/check.sh index 031fe00..05ab346 100755 --- a/testsuite/check.sh +++ b/testsuite/check.sh @@ -1,5 +1,5 @@ #! /bin/sh -# check script for Plzip - A parallel compressor compatible with lzip +# check script for Plzip - Parallel compressor compatible with lzip # Copyright (C) 2009, 2010, 2011, 2012, 2013 Antonio Diaz Diaz. # # This script is free software: you have unlimited permission @@ -28,13 +28,21 @@ fail=0 printf "testing plzip-%s..." "$2" "${LZIP}" -cqs-1 in > /dev/null -if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 1 ] ; then printf . ; else fail=1 ; printf - ; fi "${LZIP}" -cqs0 in > /dev/null -if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 1 ] ; then printf . ; else fail=1 ; printf - ; fi "${LZIP}" -cqs4095 in > /dev/null -if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 1 ] ; then printf . ; else fail=1 ; printf - ; fi "${LZIP}" -cqm274 in > /dev/null -if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi +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 +"${LZIP}" -cdq in +if [ $? = 2 ] ; then printf . ; else fail=1 ; printf - ; fi +"${LZIP}" -cdq < in +if [ $? = 2 ] ; then printf . ; else fail=1 ; printf - ; fi "${LZIP}" -t "${in_lz}" || fail=1 "${LZIP}" -cd "${in_lz}" > copy || fail=1 @@ -42,7 +50,7 @@ cmp in copy || fail=1 printf . "${LZIP}" -cfq "${in_lz}" > out -if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 1 ] ; then printf . ; else fail=1 ; printf - ; fi "${LZIP}" -cF "${in_lz}" > out || fail=1 "${LZIP}" -cd out | "${LZIP}" -d > copy || fail=1 cmp in copy || fail=1 @@ -54,32 +62,32 @@ for i in s4Ki 0 1 2 3 4 5 6 7 8 9 ; do printf "garbage" >> copy.lz || fail=1 "${LZIP}" -df copy.lz || fail=1 cmp in copy || fail=1 - printf . done +printf . for i in s4Ki 0 1 2 3 4 5 6 7 8 9 ; do "${LZIP}" -c -$i in > out || fail=1 printf "g" >> out || fail=1 "${LZIP}" -cd out > copy || fail=1 cmp in copy || fail=1 - printf . done +printf . for i in s4Ki 0 1 2 3 4 5 6 7 8 9 ; do "${LZIP}" -$i < in > out || fail=1 printf "garbage" >> out || fail=1 "${LZIP}" -d < out > copy || fail=1 cmp in copy || fail=1 - printf . done +printf . for i in s4Ki 0 1 2 3 4 5 6 7 8 9 ; do "${LZIP}" -f -$i -o out < in || fail=1 printf "g" >> out.lz || fail=1 "${LZIP}" -df -o copy < out.lz || fail=1 cmp in copy || fail=1 - printf . done +printf . "${LZIP}" < in > anyothername || fail=1 "${LZIP}" -d anyothername || fail=1 @@ -95,39 +103,38 @@ for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ; do "${LZIP}" -d -n$i out4.lz || fail=1 cmp in4 out4 || fail=1 rm -f out4 - printf . done +printf . for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ; do "${LZIP}" -s4Ki -B8Ki -n$i < in4 > out4 || fail=1 printf "g" >> out4 || fail=1 "${LZIP}" -d -n$i < out4 > copy4 || fail=1 cmp in4 copy4 || fail=1 - printf . done +printf . cat "${in_lz}" > ingin.lz || framework_failure printf "g" >> ingin.lz || framework_failure cat "${in_lz}" >> ingin.lz || framework_failure "${LZIP}" -tq ingin.lz -if [ $? != 2 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 2 ] ; then printf . ; else fail=1 ; printf - ; fi "${LZIP}" -cdq ingin.lz > out -if [ $? != 2 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 2 ] ; then printf . ; else fail=1 ; printf - ; fi "${LZIP}" -t < ingin.lz || fail=1 -printf . "${LZIP}" -d < ingin.lz > copy || fail=1 cmp in copy || fail=1 printf . dd if="${in_lz}" bs=1024 count=10 > trunc.lz 2> /dev/null || framework_failure "${LZIP}" -tq trunc.lz -if [ $? != 2 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 2 ] ; then printf . ; else fail=1 ; printf - ; fi "${LZIP}" -cdq trunc.lz > out -if [ $? != 2 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 2 ] ; then printf . ; else fail=1 ; printf - ; fi "${LZIP}" -tq < trunc.lz -if [ $? != 2 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 2 ] ; then printf . ; else fail=1 ; printf - ; fi "${LZIP}" -dq < trunc.lz > out -if [ $? != 2 ] ; then fail=1 ; printf - ; else printf . ; fi +if [ $? = 2 ] ; then printf . ; else fail=1 ; printf - ; fi echo if [ ${fail} = 0 ] ; then |