summaryrefslogtreecommitdiffstats
path: root/testsuite/check.sh
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/check.sh')
-rwxr-xr-xtestsuite/check.sh48
1 files changed, 47 insertions, 1 deletions
diff --git a/testsuite/check.sh b/testsuite/check.sh
index e2cad6f..ef60713 100755
--- a/testsuite/check.sh
+++ b/testsuite/check.sh
@@ -49,7 +49,7 @@ fail=0
# fox5_bad3.lz: [100-299] --> zeroed;
# fox5_bad4.lz: [250-349] --> zeroed;
# fox5_bad5.lz: [300-399] --> zeroed;
-# test_bad1.lz: byte at offset 67 changed from 0x70 to 0x79
+# test_bad1.lz: byte at offset 66 changed from 0xA6 to 0x46
# test_bad2.lz: [ 34- 65] --> copy of bytes [ 68- 99]
# test_bad3.lz: [ 512-1535] --> zeroed; [2560-3583] --> zeroed
# test_bad4.lz: [3072-4095] --> random data; [4608-5631] --> zeroed
@@ -180,6 +180,24 @@ cmp "${in_lz}" copy.lz || fail=1
cmp "${in_lz}" copy.lz || fail=1
printf .
+cat "${bad1_lz}" "${in_lz}" "${bad1_lz}" "${bad1_lz}" > bad11.lz || framework_failure
+cat "${bad1_lz}" "${in_lz}" "${bad2_lz}" "${in_lz}" > bad12.lz || framework_failure
+cat "${bad2_lz}" "${in_lz}" "${bad2_lz}" "${bad2_lz}" > bad22.lz || framework_failure
+cat "${in_lz}" "${in_lz}" "${in_lz}" "${in_lz}" > copy4.lz || framework_failure
+"${LZIPRECOVER}" -mf -o out4.lz bad11.lz bad12.lz bad22.lz || fail=1
+cmp out4.lz copy4.lz || fail=1
+"${LZIPRECOVER}" -mf -o out4.lz bad11.lz bad22.lz bad12.lz || fail=1
+cmp out4.lz copy4.lz || fail=1
+"${LZIPRECOVER}" -mf -o out4.lz bad12.lz bad11.lz bad22.lz || fail=1
+cmp out4.lz copy4.lz || fail=1
+"${LZIPRECOVER}" -mf -o out4.lz bad12.lz bad22.lz bad11.lz || fail=1
+cmp out4.lz copy4.lz || fail=1
+"${LZIPRECOVER}" -mf -o out4.lz bad22.lz bad11.lz bad12.lz || fail=1
+cmp out4.lz copy4.lz || fail=1
+"${LZIPRECOVER}" -mf -o out4.lz bad22.lz bad12.lz bad11.lz || fail=1
+cmp out4.lz copy4.lz || fail=1
+printf .
+
for i in "${bad1_lz}" "${bad2_lz}" ; do
for j in "${bad3_lz}" "${bad4_lz}" "${bad5_lz}" ; do
"${LZIPRECOVER}" -mf -o copy.lz "${i}" "${j}" || fail=1
@@ -209,6 +227,24 @@ printf .
cmp "${in_lz}" copy.lz || fail=1
printf .
+cat "${bad3_lz}" "${bad4_lz}" "${bad5_lz}" "${in_lz}" > bad345.lz || framework_failure
+cat "${bad4_lz}" "${bad5_lz}" "${bad3_lz}" "${in_lz}" > bad453.lz || framework_failure
+cat "${bad5_lz}" "${bad3_lz}" "${bad4_lz}" "${in_lz}" > bad534.lz || framework_failure
+cat "${in_lz}" "${in_lz}" "${in_lz}" "${in_lz}" > copy4.lz || framework_failure
+"${LZIPRECOVER}" -mf -o out4.lz bad345.lz bad453.lz bad534.lz || fail=1
+cmp out4.lz copy4.lz || fail=1
+"${LZIPRECOVER}" -mf -o out4.lz bad345.lz bad534.lz bad453.lz || fail=1
+cmp out4.lz copy4.lz || fail=1
+"${LZIPRECOVER}" -mf -o out4.lz bad453.lz bad345.lz bad534.lz || fail=1
+cmp out4.lz copy4.lz || fail=1
+"${LZIPRECOVER}" -mf -o out4.lz bad453.lz bad534.lz bad345.lz || fail=1
+cmp out4.lz copy4.lz || fail=1
+"${LZIPRECOVER}" -mf -o out4.lz bad534.lz bad345.lz bad453.lz || fail=1
+cmp out4.lz copy4.lz || fail=1
+"${LZIPRECOVER}" -mf -o out4.lz bad534.lz bad453.lz bad345.lz || fail=1
+cmp out4.lz copy4.lz || fail=1
+printf .
+
rm -f copy.lz
"${LZIPRECOVER}" -R -o copy.lz "${fox5_lz}" || fail=1
if [ $? = 0 ] && [ ! -e copy.lz ] ; then printf . ; else printf - ; fail=1 ; fi
@@ -220,6 +256,16 @@ cmp "${fox5_lz}" copy.lz || fail=1
cmp "${in_lz}" copy.lz || fail=1
printf .
+cat "${f5b1_lz}" > copy.tar.lz || framework_failure
+"${LZIPRECOVER}" -R copy.tar.lz || fail=1
+if [ $? = 0 ] && [ -e copy_fixed.tar.lz ] ; then printf . ; else printf - ; fail=1 ; fi
+mv copy.tar.lz copy.lz || framework_failure
+"${LZIPRECOVER}" -R copy.lz || fail=1
+if [ $? = 0 ] && [ -e copy_fixed.lz ] ; then printf . ; else printf - ; fail=1 ; fi
+mv copy.lz copy.tlz || framework_failure
+"${LZIPRECOVER}" -R copy.tlz || fail=1
+if [ $? = 0 ] && [ -e copy_fixed.tlz ] ; then printf . ; else printf - ; fail=1 ; fi
+
cat "${in_lz}" "${in_lz}" "${in_lz}" > copy || framework_failure
printf "garbage" >> copy || fail=1
"${LZIPRECOVER}" -s -o copy.lz copy || fail=1