summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/check.sh86
1 files changed, 46 insertions, 40 deletions
diff --git a/testsuite/check.sh b/testsuite/check.sh
index bd77f02..f208067 100755
--- a/testsuite/check.sh
+++ b/testsuite/check.sh
@@ -41,92 +41,98 @@ fail=0
printf "testing lziprecover-%s..." "$2"
+"${LZIPRECOVER}" -lq
+if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi
+"${LZIPRECOVER}" -mq "${bad1_lz}"
+if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi
+"${LZIPRECOVER}" -Rq
+if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi
+"${LZIPRECOVER}" -sq
+if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi
+
"${LZIP}" -t "${testdir}"/test_v0.lz || fail=1
printf .
"${LZIP}" -cd "${testdir}"/test_v0.lz > copy || fail=1
-cmp ${in} copy || fail=1
+cmp "${in}" copy || fail=1
printf .
"${LZIP}" -t "${testdir}"/test_v1.lz || fail=1
printf .
"${LZIP}" -cd "${testdir}"/test_v1.lz > copy || fail=1
-cmp ${in} copy || fail=1
+cmp "${in}" copy || fail=1
printf .
-"${LZIPRECOVER}" -lq
-if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi
-"${LZIPRECOVER}" -mq ${bad1_lz}
-if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi
-"${LZIPRECOVER}" -Rq
-if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi
-"${LZIPRECOVER}" -sq
-if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi
-
-"${LZIPRECOVER}" -D 921-1921 -fo copy ${in_lz} || fail=1
-cmp ${inD} copy || fail=1
+"${LZIPRECOVER}" -D 921-1921 -fo copy "${in_lz}" || fail=1
+cmp "${inD}" copy || fail=1
printf .
-"${LZIPRECOVER}" -D 921,1000 ${in_lz} > copy || fail=1
-cmp ${inD} copy || fail=1
+"${LZIPRECOVER}" -D 921,1000 "${in_lz}" > copy || fail=1
+cmp "${inD}" copy || fail=1
printf .
-"${LZIPRECOVER}" -m -o copy.lz ${bad1_lz} ${bad2_lz} ${bad1_lz} -q
+"${LZIPRECOVER}" -m -o copy.lz "${bad1_lz}" "${bad2_lz}" "${bad1_lz}" -q
if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi
-"${LZIPRECOVER}" -m -o copy.lz ${bad1_lz} ${bad2_lz} || fail=1
+"${LZIPRECOVER}" -m -o copy.lz "${bad1_lz}" "${bad2_lz}" || fail=1
"${LZIPRECOVER}" -df copy.lz || fail=1
-cmp ${in} copy || fail=1
+cmp "${in}" copy || fail=1
printf .
-"${LZIPRECOVER}" -m -o copy.lz ${bad2_lz} ${bad1_lz} || fail=1
+"${LZIPRECOVER}" -m -o copy.lz "${bad2_lz}" "${bad1_lz}" || fail=1
"${LZIPRECOVER}" -df copy.lz || fail=1
-cmp ${in} copy || fail=1
+cmp "${in}" copy || fail=1
printf .
-for i in ${bad1_lz} ${bad2_lz} ; do
- for j in ${bad3_lz} ${bad4_lz} ${bad5_lz} ; do
- "${LZIPRECOVER}" -m -o copy.lz ${i} ${j} || fail=1
+for i in "${bad1_lz}" "${bad2_lz}" ; do
+ for j in "${bad3_lz}" "${bad4_lz}" "${bad5_lz}" ; do
+ "${LZIPRECOVER}" -m -o copy.lz "${i}" "${j}" || fail=1
"${LZIPRECOVER}" -df copy.lz || fail=1
- cmp ${in} copy || fail=1
+ cmp "${in}" copy || fail=1
printf .
- "${LZIPRECOVER}" -m -o copy.lz ${j} ${i} || fail=1
+ "${LZIPRECOVER}" -m -o copy.lz "${j}" "${i}" || fail=1
"${LZIPRECOVER}" -df copy.lz || fail=1
- cmp ${in} copy || fail=1
+ cmp "${in}" copy || fail=1
printf .
done
done
-"${LZIPRECOVER}" -m -o copy.lz ${bad3_lz} ${bad4_lz} ${bad5_lz} || fail=1
+"${LZIPRECOVER}" -m -o copy.lz "${bad3_lz}" "${bad4_lz}" "${bad5_lz}" || fail=1
"${LZIPRECOVER}" -df copy.lz || fail=1
-cmp ${in} copy || fail=1
+cmp "${in}" copy || fail=1
printf .
-"${LZIPRECOVER}" -m -o copy.lz ${bad4_lz} ${bad5_lz} ${bad3_lz} || fail=1
+"${LZIPRECOVER}" -m -o copy.lz "${bad4_lz}" "${bad5_lz}" "${bad3_lz}" || fail=1
"${LZIPRECOVER}" -df copy.lz || fail=1
-cmp ${in} copy || fail=1
+cmp "${in}" copy || fail=1
printf .
-"${LZIPRECOVER}" -m -o copy.lz ${bad5_lz} ${bad3_lz} ${bad4_lz} || fail=1
+"${LZIPRECOVER}" -m -o copy.lz "${bad5_lz}" "${bad3_lz}" "${bad4_lz}" || fail=1
"${LZIPRECOVER}" -df copy.lz || fail=1
-cmp ${in} copy || fail=1
+cmp "${in}" copy || fail=1
printf .
-"${LZIPRECOVER}" -R ${in_lz} || fail=1
+"${LZIPRECOVER}" -R "${in_lz}" || fail=1
printf .
-"${LZIPRECOVER}" -R -o copy.lz ${bad2_lz} -q
+"${LZIPRECOVER}" -R -o copy.lz "${bad2_lz}" -q
if [ $? != 2 ] ; then fail=1 ; printf - ; else printf . ; fi
-"${LZIPRECOVER}" -R -o copy.lz ${bad1_lz} || fail=1
+"${LZIPRECOVER}" -R -o copy.lz "${bad1_lz}" || fail=1
"${LZIPRECOVER}" -df copy.lz || fail=1
-cmp ${in} copy || fail=1
+cmp "${in}" copy || fail=1
printf .
-cat ${in_lz} ${in_lz} ${in_lz} > copy || framework_failure
+cat "${in_lz}" "${in_lz}" "${in_lz}" > copy || framework_failure
printf "garbage" >> copy || fail=1
"${LZIPRECOVER}" -s -o copy.lz copy || fail=1
for i in 1 2 3 ; do
"${LZIPRECOVER}" -cd rec0000${i}copy.lz > copy || fail=1
- cmp ${in} copy || fail=1
+ cmp "${in}" copy || fail=1
printf .
done
-cat ${in_lz} > anyothername || framework_failure
+cat "${in_lz}" > anyothername || framework_failure
"${LZIP}" -d anyothername || fail=1
-cmp ${in} anyothername.out || fail=1
+cmp "${in}" anyothername.out || fail=1
+printf .
+
+cat "${in}" "${in}" > in2 || framework_failure
+cat "${in_lz}" "${in_lz}" > out2 || framework_failure
+"${LZIP}" -d < out2 > copy2 || fail=1
+cmp in2 copy2 || fail=1
printf .
echo