summaryrefslogtreecommitdiffstats
path: root/testsuite/check.sh
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 09:59:20 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 09:59:20 +0000
commitefdc5b2e77cfe046e2cfd743ccd06bf69b382641 (patch)
tree8a9c6da7aee9ddc5fabcd45d2e366b3db7053c04 /testsuite/check.sh
parentAdding upstream version 1.15~pre2. (diff)
downloadlzip-efdc5b2e77cfe046e2cfd743ccd06bf69b382641.tar.xz
lzip-efdc5b2e77cfe046e2cfd743ccd06bf69b382641.zip
Adding upstream version 1.15~pre3.upstream/1.15_pre3
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'testsuite/check.sh')
-rwxr-xr-xtestsuite/check.sh27
1 files changed, 14 insertions, 13 deletions
diff --git a/testsuite/check.sh b/testsuite/check.sh
index 64f481c..8adf23b 100755
--- a/testsuite/check.sh
+++ b/testsuite/check.sh
@@ -22,27 +22,28 @@ mkdir tmp
cd "${objdir}"/tmp
cat "${testdir}"/test.txt > in || framework_failure
+in_lz="${testdir}"/test.txt.lz
fail=0
printf "testing lzip-%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}" -t "${testdir}"/test.txt.lz || fail=1
-"${LZIP}" -cd "${testdir}"/test.txt.lz > copy || fail=1
+"${LZIP}" -t "${in_lz}" || fail=1
+"${LZIP}" -cd "${in_lz}" > copy || fail=1
cmp in copy || fail=1
printf .
-"${LZIP}" -cfq "${testdir}"/test.txt.lz > out
-if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi
-"${LZIP}" -cF "${testdir}"/test.txt.lz > out || fail=1
+"${LZIP}" -cfq "${in_lz}" > out
+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
printf .
@@ -53,30 +54,30 @@ 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
"${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
"${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