summaryrefslogtreecommitdiffstats
path: root/testsuite/check.sh
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/check.sh')
-rwxr-xr-xtestsuite/check.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/testsuite/check.sh b/testsuite/check.sh
index f208067..ea6e768 100755
--- a/testsuite/check.sh
+++ b/testsuite/check.sh
@@ -25,6 +25,8 @@ cd "${objdir}"/tmp
in="${testdir}"/test.txt
in_lz="${testdir}"/test_v1.lz
inD="${testdir}"/test921-1921.txt
+fox5="${testdir}"/fox5_bad.txt
+fox5_lz="${testdir}"/fox5_bad.lz
bad1_lz="${testdir}"/test_bad1.lz
bad2_lz="${testdir}"/test_bad2.lz
bad3_lz="${testdir}"/test_bad3.lz
@@ -33,6 +35,7 @@ bad5_lz="${testdir}"/test_bad5.lz
fail=0
# Description of test files for lziprecover:
+# fox5_bad.lz: byte at offset 188 changed from 0x34 to 0x33
# test_bad1.lz: byte at offset 67 changed from 0xCC to 0x33
# test_bad2.lz: [ 34- 66) --> copy of bytes [ 68- 100)
# test_bad3.lz: [ 512-1536) --> zeroed; [2560-3584) --> zeroed
@@ -68,9 +71,13 @@ printf .
"${LZIPRECOVER}" -D 921,1000 "${in_lz}" > copy || fail=1
cmp "${inD}" copy || fail=1
printf .
+"${LZIPRECOVER}" -D0 -iq -fo copy "${fox5_lz}"
+if [ $? = 2 ] && cmp "${fox5}" copy ; then printf . ; else fail=1 ; printf - ; fi
+"${LZIPRECOVER}" -D0 -iq "${fox5_lz}" > copy
+if [ $? = 2 ] && cmp "${fox5}" copy ; then printf . ; else fail=1 ; printf - ; fi
"${LZIPRECOVER}" -m -o copy.lz "${bad1_lz}" "${bad2_lz}" "${bad1_lz}" -q
-if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi
+if [ $? != 2 ] ; then fail=1 ; printf - ; else printf . ; fi
"${LZIPRECOVER}" -m -o copy.lz "${bad1_lz}" "${bad2_lz}" || fail=1
"${LZIPRECOVER}" -df copy.lz || fail=1
cmp "${in}" copy || fail=1
@@ -119,7 +126,7 @@ 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
+ "${LZIPRECOVER}" -cd rec${i}copy.lz > copy || fail=1
cmp "${in}" copy || fail=1
printf .
done