summaryrefslogtreecommitdiffstats
path: root/testsuite/check.sh
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/check.sh')
-rwxr-xr-xtestsuite/check.sh73
1 files changed, 41 insertions, 32 deletions
diff --git a/testsuite/check.sh b/testsuite/check.sh
index 5885ba2..5b8244c 100755
--- a/testsuite/check.sh
+++ b/testsuite/check.sh
@@ -21,12 +21,14 @@ if [ -d tmp ] ; then rm -rf tmp ; fi
mkdir tmp
cd "${objdir}"/tmp
-ln "${testdir}"/test.txt in || framework_failure
-ln "${testdir}"/test_v1.lz in.lz || framework_failure
-cat in.lz in.lz in.lz > in3.lz || framework_failure
-for i in 1 2 3 4 5 ; do
- ln "${testdir}"/test_bad${i}.lz bad${i}.lz
-done
+in="${testdir}"/test.txt
+in_lz="${testdir}"/test_v1.lz
+inD="${testdir}"/test921-1921.txt
+bad1_lz="${testdir}"/test_bad1.lz
+bad2_lz="${testdir}"/test_bad2.lz
+bad3_lz="${testdir}"/test_bad3.lz
+bad4_lz="${testdir}"/test_bad4.lz
+bad5_lz="${testdir}"/test_bad5.lz
fail=0
# Description of test files for lziprecover:
@@ -38,58 +40,65 @@ fail=0
printf "testing lziprecover-%s..." "$2"
-"${LZIPRECOVER}" -m -o copy.lz bad1.lz bad2.lz bad1.lz -q
+"${LZIPRECOVER}" -D 921-1921 -o 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
+printf .
+
+"${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 1 2 ; do
- for j in 3 4 5 ; do
- "${LZIPRECOVER}" -m -o copy.lz bad${i}.lz bad${j}.lz || 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 bad${j}.lz bad${i}.lz || 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 in3.lz > out || framework_failure
-printf "garbage" >> out || fail=1
-"${LZIPRECOVER}" -s out -o out.lz || fail=1
+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}out.lz > copy || fail=1
- cmp in copy || fail=1
+ "${LZIPRECOVER}" -cd rec0000${i}copy.lz > copy || fail=1
+ cmp ${in} copy || fail=1
printf .
done