summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/check.sh666
-rw-r--r--testsuite/fox6_mark.lzbin480 -> 0 bytes
-rw-r--r--testsuite/fox6_nz.lzbin0 -> 480 bytes
-rw-r--r--testsuite/test.txt6
-rw-r--r--testsuite/test.txt.lzbin7376 -> 7341 bytes
-rw-r--r--testsuite/test.txt.lz.fecbin0 -> 4424 bytes
-rw-r--r--testsuite/test.txt.lz.fec16bin0 -> 4424 bytes
-rw-r--r--testsuite/test.txt.lzmabin7363 -> 7328 bytes
-rw-r--r--testsuite/test21636.txt (renamed from testsuite/test21723.txt)0
-rw-r--r--testsuite/test_3m.txt.lz.md52
-rw-r--r--testsuite/test_bad1.lzbin7376 -> 7341 bytes
-rw-r--r--testsuite/test_bad2.lzbin7376 -> 7341 bytes
-rw-r--r--testsuite/test_bad3.lzbin7376 -> 7341 bytes
-rw-r--r--testsuite/test_bad4.lzbin7376 -> 7341 bytes
-rw-r--r--testsuite/test_bad5.lzbin7376 -> 7341 bytes
-rw-r--r--testsuite/test_bad6.lzbin7376 -> 7341 bytes
-rw-r--r--testsuite/test_bad6.txt11
-rw-r--r--testsuite/test_bad7.lzbin7376 -> 7341 bytes
-rw-r--r--testsuite/test_bad7.txt30
-rw-r--r--testsuite/test_bad8.lzbin7376 -> 7341 bytes
-rw-r--r--testsuite/test_bad9.lzbin7376 -> 7341 bytes
-rw-r--r--testsuite/test_bad9.txt12
-rw-r--r--testsuite/test_em.txt.lzbin14024 -> 13950 bytes
23 files changed, 391 insertions, 336 deletions
diff --git a/testsuite/check.sh b/testsuite/check.sh
index a65f062..638d6db 100755
--- a/testsuite/check.sh
+++ b/testsuite/check.sh
@@ -29,11 +29,11 @@ if [ -d tmp ] ; then rm -rf tmp ; fi
mkdir tmp
cd "${objdir}"/tmp || framework_failure
-cat "${testdir}"/test.txt > in || framework_failure
+cp "${testdir}"/test.txt in || framework_failure
in_lz="${testdir}"/test.txt.lz
in_lzma="${testdir}"/test.txt.lzma
in_em="${testdir}"/test_em.txt.lz
-inD="${testdir}"/test21723.txt
+inD="${testdir}"/test21636.txt
bad1_lz="${testdir}"/test_bad1.lz
bad2_lz="${testdir}"/test_bad2.lz
bad3_lz="${testdir}"/test_bad3.lz
@@ -58,28 +58,28 @@ f6s3_lz="${testdir}"/fox6_sc3.lz
f6s4_lz="${testdir}"/fox6_sc4.lz
f6s5_lz="${testdir}"/fox6_sc5.lz
f6s6_lz="${testdir}"/fox6_sc6.lz
-f6mk_lz="${testdir}"/fox6_mark.lz
+f6nz_lz="${testdir}"/fox6_nz.lz
num_lz="${testdir}"/numbers.lz
nbt_lz="${testdir}"/numbersbt.lz
fail=0
test_failed() { fail=1 ; printf " $1" ; [ -z "$2" ] || printf "($2)" ; }
# Description of test files for lziprecover:
-# single-member files with one or more errors
+# single-member files; test.txt.lz with one or more errors
# test_bad1.lz: byte at offset 66 changed from 0xA6 to 0x26
-# 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 errors [4608-5631] --> zeroed
-# test_bad5.lz: [1024-2047] --> random errors [5120-6143] --> random data
-# test_bad6.lz: [ 512-1023] --> zeroed (reference test.txt [ 891- 2137])
-# test_bad7.lz: [6656-7167] --> zeroed (reference test.txt [20428-32231])
-# test_bad8.lz: [ 66- 73] --> zeroed (reference test.txt [ 89- 110])
-# test_bad9.lz: [6491-6498] --> zeroed (reference test.txt [17977-18120])
+# 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 bit flips [4608-5631] --> zeroed
+# test_bad5.lz: [1024-2047] --> random bit flips [5120-6143] --> random data
+# test_bad6.lz: [ 512-1023] --> zeroed (reference test.txt [ 892- 2414])
+# test_bad7.lz: [6656-7167] --> zeroed (reference test.txt [20798-33385])
+# test_bad8.lz: [ 66- 73] --> zeroed (reference test.txt [ 89- 110])
+# test_bad9.lz: [6491-6498] --> zeroed (reference test.txt [17982-18594])
#
# test_em.txt.lz: test.txt split in 3, with 5 empty members (1,3,5-6,8)
# test_3m.txt.lz.md5: md5sum of test_em.txt.lz after removing empty members
#
-# 6-member files with one or more errors
+# 6-member files; fox6.lz with one or more errors
# fox6_bad1.lz: byte at offset 5 changed from 0x0C to 0x00 (DS)
# byte at offset 142 changed from 0x50 to 0x70 (CRC)
# byte at offset 224 changed from 0x2D to 0x2E (data_size)
@@ -92,7 +92,7 @@ test_failed() { fail=1 ; printf " $1" ; [ -z "$2" ] || printf "($2)" ; }
# fox6_bad5.lz: [380-479] --> zeroed (members 5,6)
# fox6_bad6.lz: [430-439] --> zeroed (member 6)
#
-# fox6_mark.lz: 4 last members marked with bytes 'm', 'a', 'r', 'k'
+# fox6_nz.lz: first LZMA byte of 4 last members set to 'a', 'b', 'c', 'd'
#
# 6-member files "shortcircuited" by a corrupt or fake trailer
# fox6_sc1.lz: (corrupt but consistent last trailer)
@@ -168,7 +168,7 @@ printf "LZIP\001+.............................." | "${LZIP}" -t 2> /dev/null
[ $? = 1 ] || test_failed $LINENO
"${LZIPRECOVER}" -mq "${bad1_lz}"
[ $? = 1 ] || test_failed $LINENO
-"${LZIPRECOVER}" -Rq
+"${LZIPRECOVER}" -Bq
[ $? = 1 ] || test_failed $LINENO
"${LZIPRECOVER}" -sq
[ $? = 1 ] || test_failed $LINENO
@@ -188,7 +188,7 @@ printf "LZIP\001+.............................." | "${LZIP}" -t 2> /dev/null
[ $? = 1 ] || test_failed $LINENO
"${LZIPRECOVER}" -q --dump=damaged in > out # /dev/null returns 1 on OS/2
[ $? = 2 ] || test_failed $LINENO
-"${LZIPRECOVER}" -q --dump=damagedd "${in_lz}" > /dev/null
+"${LZIPRECOVER}" -q --dump=damageed "${in_lz}" > /dev/null
[ $? = 1 ] || test_failed $LINENO
"${LZIPRECOVER}" -q --dump=empty
[ $? = 1 ] || test_failed $LINENO
@@ -196,13 +196,13 @@ printf "LZIP\001+.............................." | "${LZIP}" -t 2> /dev/null
[ $? = 1 ] || test_failed $LINENO
"${LZIPRECOVER}" -q --strip=damaged in > out # /dev/null returns 1 on OS/2
[ $? = 2 ] || test_failed $LINENO
-"${LZIPRECOVER}" -q --strip=damagedd "${in_lz}" > /dev/null
+"${LZIPRECOVER}" -q --strip=damageed "${in_lz}" > /dev/null
[ $? = 1 ] || test_failed $LINENO
"${LZIPRECOVER}" -q --remove=damaged
[ $? = 1 ] || test_failed $LINENO
"${LZIPRECOVER}" -q --remove=damaged in
[ $? = 2 ] || test_failed $LINENO
-"${LZIPRECOVER}" -q --remove=damagedd "${in_lz}"
+"${LZIPRECOVER}" -q --remove=damageed "${in_lz}"
[ $? = 1 ] || test_failed $LINENO
"${LZIPRECOVER}" -q --dump=tdata
[ $? = 1 ] || test_failed $LINENO
@@ -244,14 +244,14 @@ cmp "${in_lz}" out.lz || test_failed $LINENO
"${LZIPRECOVER}" -A < "${in_lzma}" > out.lz || test_failed $LINENO
cmp "${in_lz}" out.lz || test_failed $LINENO
rm -f out.lz || framework_failure
-cat "${in_lzma}" > out.lzma || framework_failure
+cp "${in_lzma}" out.lzma || framework_failure
"${LZIPRECOVER}" -Ak out.lzma || test_failed $LINENO
cmp "${in_lz}" out.lz || test_failed $LINENO
printf "to be overwritten" > out.lz || framework_failure
"${LZIPRECOVER}" -Af out.lzma || test_failed $LINENO
cmp "${in_lz}" out.lz || test_failed $LINENO
rm -f out.lz || framework_failure
-cat "${in_lzma}" > out.tlz || framework_failure
+cp "${in_lzma}" out.tlz || framework_failure
"${LZIPRECOVER}" -Ak out.tlz || test_failed $LINENO
cmp "${in_lz}" out.tar.lz || test_failed $LINENO
printf "to be overwritten" > out.tar.lz || framework_failure
@@ -271,36 +271,37 @@ rm -rf a || framework_failure
printf "\ntesting decompression..."
for i in "${in_lz}" "${in_em}" ; do
- "${LZIP}" -lq "$i" || test_failed $LINENO "$i"
- "${LZIP}" -t "$i" || test_failed $LINENO "$i"
- "${LZIP}" -d "$i" -o out || test_failed $LINENO "$i"
+ "${LZIP}" -lq "$i" --ignore-empty || test_failed $LINENO "$i"
+ "${LZIP}" -t "$i" --ignore-empty || test_failed $LINENO "$i"
+ "${LZIP}" -d "$i" --ignore-empty -o out || test_failed $LINENO "$i"
cmp in out || test_failed $LINENO "$i"
- "${LZIP}" -cd "$i" > out || test_failed $LINENO "$i"
+ "${LZIP}" -cd "$i" --ignore-empty > out || test_failed $LINENO "$i"
cmp in out || test_failed $LINENO "$i"
- "${LZIP}" -d "$i" -o - > out || test_failed $LINENO "$i"
+ "${LZIP}" -d "$i" --ignore-empty -o - > out || test_failed $LINENO "$i"
cmp in out || test_failed $LINENO "$i"
- "${LZIP}" -d < "$i" > out || test_failed $LINENO "$i"
+ "${LZIP}" -d < "$i" --ignore-empty > out || test_failed $LINENO "$i"
cmp in out || test_failed $LINENO "$i"
rm -f out || framework_failure
done
-lines=`"${LZIP}" -tvv "${in_em}" 2>&1 | wc -l` || test_failed $LINENO
+lines=`"${LZIP}" -tvv "${in_em}" --ignore-empty 2>&1 | wc -l` ||
+ test_failed $LINENO
[ "${lines}" -eq 8 ] || test_failed $LINENO "${lines}"
-"${LZIP}" -tq "${in_em}" --empty-error
+"${LZIP}" -tq "${in_em}"
[ $? = 2 ] || test_failed $LINENO
-lines=`"${LZIP}" -lvv "${in_em}" | wc -l` || test_failed $LINENO
+lines=`"${LZIP}" -lvv "${in_em}" --ignore-empty | wc -l` || test_failed $LINENO
[ "${lines}" -eq 11 ] || test_failed $LINENO "${lines}"
-"${LZIP}" -lq "${in_em}" --empty-error
+"${LZIP}" -lq "${in_em}"
[ $? = 2 ] || test_failed $LINENO
-cat "${in_lz}" > out.lz || framework_failure
+cp "${in_lz}" out.lz || framework_failure
"${LZIP}" -dk out.lz || test_failed $LINENO
cmp in out || test_failed $LINENO
rm -f out || framework_failure
"${LZIP}" -cd "${fox_lz}" > fox || test_failed $LINENO
-cat fox > copy || framework_failure
-cat "${in_lz}" > copy.lz || framework_failure
+cp fox copy || framework_failure
+cp "${in_lz}" copy.lz || framework_failure
"${LZIP}" -d copy.lz out.lz 2> /dev/null # skip copy, decompress out
[ $? = 1 ] || test_failed $LINENO
[ ! -e out.lz ] || test_failed $LINENO
@@ -322,7 +323,7 @@ rm -f ./- || framework_failure
cmp in ./- || test_failed $LINENO
rm -f ./- || framework_failure
-cat "${in_lz}" > anyothername || framework_failure
+cp "${in_lz}" anyothername || framework_failure
"${LZIP}" -dv - anyothername - < "${in_lz}" > out 2> /dev/null ||
test_failed $LINENO
cmp in out || test_failed $LINENO
@@ -344,7 +345,7 @@ cat out in | cmp in - || test_failed $LINENO # out must be empty
[ $? = 1 ] || test_failed $LINENO
cmp in out || test_failed $LINENO
rm -f out || framework_failure
-cat "${in_lz}" > out.lz || framework_failure
+cp "${in_lz}" out.lz || framework_failure
for i in 1 2 3 4 5 6 7 ; do
printf "g" >> out.lz || framework_failure
"${LZIP}" -alvv out.lz "${in_lz}" > /dev/null 2>&1
@@ -396,52 +397,45 @@ printf "to be overwritten" > out2 || framework_failure
cmp in2 out2 || test_failed $LINENO
rm -f out2 || framework_failure
+"${LZIP}" -d "${fox_lz}" -o a/b/c/fox || test_failed $LINENO
+cmp fox a/b/c/fox || test_failed $LINENO
+rm -rf a || framework_failure
+"${LZIP}" -d -o a/b/c/fox < "${fox_lz}" || test_failed $LINENO
+cmp fox a/b/c/fox || test_failed $LINENO
+rm -rf a || framework_failure
+"${LZIP}" -dq "${fox_lz}" -o a/b/c/
+[ $? = 1 ] || test_failed $LINENO
+[ ! -e a ] || test_failed $LINENO
+
+if [ -z "${LZIP_NAME}" ] ; then LZIP_NAME=lzip ; fi
+touch empty em || framework_failure
+"${LZIP_NAME}" -0 em || test_failed $LINENO
+"${LZIP}" -lq em.lz || test_failed $LINENO
+"${LZIP}" -d em.lz || test_failed $LINENO
+cmp empty em || test_failed $LINENO
+rm -f em || framework_failure
+
"${LZIPRECOVER}" -D ,18000 "${in_lz}" > out || test_failed $LINENO
"${LZIPRECOVER}" -D 18000 "${in_lz}" >> out || test_failed $LINENO
cmp in out || test_failed $LINENO
-"${LZIPRECOVER}" -D 21723-22120 -fo out "${in_lz}" || test_failed $LINENO
+"${LZIPRECOVER}" -D 21636-22033 -fo out "${in_lz}" || test_failed $LINENO
cmp "${inD}" out || test_failed $LINENO
-"${LZIPRECOVER}" -D 21723,397 "${in_lz}" > out || test_failed $LINENO
+"${LZIPRECOVER}" -D 21636,397 "${in_lz}" > out || test_failed $LINENO
cmp "${inD}" out || test_failed $LINENO
-"${LZIPRECOVER}" -D 21723,397 "${in_em}" > out || test_failed $LINENO
+"${LZIPRECOVER}" -D 21636,397 "${in_em}" --ignore-empty > out ||
+ test_failed $LINENO
cmp "${inD}" out || test_failed $LINENO
-"${LZIPRECOVER}" -q -D 21723,397 --empty-error "${in_em}"
+"${LZIPRECOVER}" -q -D 21636,397 "${in_em}"
[ $? = 2 ] || test_failed $LINENO
"${LZIP}" -D 0 "${in_lz}" -o a/b/c/out || test_failed $LINENO
cmp in a/b/c/out || test_failed $LINENO
rm -rf a || framework_failure
-"${LZIP}" -cd "${fox6_lz}" > out || test_failed $LINENO
-"${LZIP}" -cd "${f6mk_lz}" > copy || test_failed $LINENO
-cmp copy out || test_failed $LINENO
-rm -f copy out || framework_failure
-"${LZIP}" -lq "${f6mk_lz}" --marking-error
-[ $? = 2 ] || test_failed $LINENO
-"${LZIP}" -tq "${f6mk_lz}" --marking-error
-[ $? = 2 ] || test_failed $LINENO
-cat "${f6mk_lz}" > f6mk.lz || framework_failure
-cat "${f6mk_lz}" > f6mk2.lz || framework_failure
-cmp -s "${fox6_lz}" f6mk.lz && test_failed $LINENO
-"${LZIPRECOVER}" --clear-marking f6mk.lz f6mk2.lz || test_failed $LINENO
-cmp "${fox6_lz}" f6mk.lz || test_failed $LINENO
-cmp "${fox6_lz}" f6mk2.lz || test_failed $LINENO
-rm -f f6mk.lz f6mk2.lz || framework_failure
-
-"${LZIP}" -d "${fox_lz}" -o a/b/c/fox || test_failed $LINENO
-cmp fox a/b/c/fox || test_failed $LINENO
-rm -rf a || framework_failure
-"${LZIP}" -d -o a/b/c/fox < "${fox_lz}" || test_failed $LINENO
-cmp fox a/b/c/fox || test_failed $LINENO
-rm -rf a || framework_failure
-"${LZIP}" -dq "${fox_lz}" -o a/b/c/
-[ $? = 1 ] || test_failed $LINENO
-[ ! -e a ] || test_failed $LINENO
-
printf "\ntesting bad input..."
headers='LZIp LZiP LZip LzIP LzIp LziP lZIP lZIp lZiP lzIP'
-body='\001\014\000\203\377\373\377\377\300\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000$\000\000\000\000\000\000\000'
-cat "${in_lz}" > int.lz || framework_failure
+body='\001\014\000\000\101\376\367\377\377\340\000\200\000\215\357\002\322\001\000\000\000\000\000\000\000\045\000\000\000\000\000\000\000'
+cp "${in_lz}" int.lz || framework_failure
printf "LZIP${body}" >> int.lz || framework_failure
if "${LZIP}" -tq int.lz ; then
for header in ${headers} ; do
@@ -462,7 +456,7 @@ if "${LZIP}" -tq int.lz ; then
[ $? = 2 ] || test_failed $LINENO ${header}
"${LZIP}" -cdq --loose-trailing int.lz > /dev/null
[ $? = 2 ] || test_failed $LINENO ${header}
- cat "${in_lz}" > int.lz || framework_failure
+ cp "${in_lz}" int.lz || framework_failure
printf "${header}${body}" >> int.lz || framework_failure
"${LZIP}" -lq int.lz # trailing data
[ $? = 2 ] || test_failed $LINENO ${header}
@@ -507,6 +501,21 @@ else
fi
rm -f int.lz out || framework_failure
+"${LZIP}" -cd "${fox6_lz}" > out || test_failed $LINENO
+"${LZIPRECOVER}" -cd "${f6nz_lz}" --ignore-nonzero > copy || test_failed $LINENO
+cmp copy out || test_failed $LINENO
+rm -f copy out || framework_failure
+"${LZIP}" -lq "${f6nz_lz}" || test_failed $LINENO
+"${LZIP}" -tq "${f6nz_lz}"
+[ $? = 2 ] || test_failed $LINENO
+cp "${f6nz_lz}" f6nz.lz || framework_failure
+cp "${f6nz_lz}" f6nz2.lz || framework_failure
+cmp -s "${fox6_lz}" f6nz.lz && test_failed $LINENO
+"${LZIPRECOVER}" --nonzero-repair f6nz.lz f6nz2.lz || test_failed $LINENO
+cmp "${fox6_lz}" f6nz.lz || test_failed $LINENO
+cmp "${fox6_lz}" f6nz2.lz || test_failed $LINENO
+rm -f f6nz.lz f6nz2.lz || framework_failure
+
for i in fox_v2.lz fox_s11.lz fox_de20.lz \
fox_bcrc.lz fox_crc0.lz fox_das46.lz fox_mes81.lz ; do
"${LZIP}" -tq "${testdir}"/$i
@@ -525,9 +534,9 @@ rm -f fox out || framework_failure
cat "${in_lz}" "${in_lz}" > in2.lz || framework_failure
cat "${in_lz}" "${in_lz}" "${in_lz}" > in3.lz || framework_failure
-if dd if=in3.lz of=trunc.lz bs=14752 count=1 2> /dev/null &&
+if dd if=in3.lz of=trunc.lz bs=14682 count=1 2> /dev/null &&
[ -e trunc.lz ] && cmp in2.lz trunc.lz > /dev/null 2>&1 ; then
- for i in 6 20 14734 14753 14754 14755 14756 14757 14758 ; do
+ for i in 6 20 14664 14683 14684 14685 14686 14687 14688 ; do
dd if=in3.lz of=trunc.lz bs=$i count=1 2> /dev/null
"${LZIP}" -lq trunc.lz
[ $? = 2 ] || test_failed $LINENO $i
@@ -554,7 +563,7 @@ for i in "${f6s3_lz}" "${f6s4_lz}" "${f6s5_lz}" "${f6s6_lz}" ; do
[ "${lines}" -eq 9 ] || test_failed $LINENO "$i ${lines}"
done
-cat "${in_lz}" > ingin.lz || framework_failure
+cp "${in_lz}" ingin.lz || framework_failure
printf "g" >> ingin.lz || framework_failure
cat "${in_lz}" >> ingin.lz || framework_failure
"${LZIP}" -lq ingin.lz
@@ -588,7 +597,6 @@ cmp "${f6b1}" out || test_failed $LINENO
"${LZIPRECOVER}" -D0 -iq "${f6b1_lz}" > out || test_failed $LINENO
cmp "${f6b1}" out || test_failed $LINENO
-touch empty || framework_failure
"${LZIPRECOVER}" -D0 -q ingin.lz > out
[ $? = 2 ] || test_failed $LINENO
cmp empty out || test_failed $LINENO
@@ -604,6 +612,70 @@ cmp in2 out2 || test_failed $LINENO
"${LZIPRECOVER}" -t -iq in2t.lz || test_failed $LINENO
rm -f in2 in2t.lz out out2 || framework_failure
+printf "\ntesting --byte-repair..."
+
+rm -f out.lz || framework_failure
+"${LZIPRECOVER}" -B -o out.lz "${fox6_lz}" || test_failed $LINENO
+[ ! -e out.lz ] || test_failed $LINENO
+"${LZIPRECOVER}" -B -o out.lz "${bad2_lz}" -q
+[ $? = 2 ] || test_failed $LINENO
+[ ! -e out.lz ] || test_failed $LINENO
+"${LZIPRECOVER}" -B -o out.lz "${bad3_lz}" -q
+[ $? = 2 ] || test_failed $LINENO
+[ ! -e out.lz ] || test_failed $LINENO
+"${LZIPRECOVER}" -B -o out.lz "${bad4_lz}" -q
+[ $? = 2 ] || test_failed $LINENO
+[ ! -e out.lz ] || test_failed $LINENO
+"${LZIPRECOVER}" -Bf -o out.lz "${f6b1_lz}" || test_failed $LINENO
+cmp "${fox6_lz}" out.lz || test_failed $LINENO
+"${LZIPRECOVER}" -Bf -o out.lz "${bad1_lz}" || test_failed $LINENO
+cmp "${in_lz}" out.lz || test_failed $LINENO
+"${LZIPRECOVER}" -B -o a/b/c/out.lz "${bad1_lz}" || test_failed $LINENO
+cmp "${in_lz}" a/b/c/out.lz || test_failed $LINENO
+rm -rf a || framework_failure
+
+cp "${f6b1_lz}" out.lz || framework_failure
+"${LZIPRECOVER}" -B out.lz || test_failed $LINENO
+[ -e out_fixed.lz ] || test_failed $LINENO
+mv out.lz out.tar.lz || framework_failure
+"${LZIPRECOVER}" -B out.tar.lz || test_failed $LINENO
+[ -e out_fixed.tar.lz ] || test_failed $LINENO
+mv out.tar.lz out.tlz || framework_failure
+"${LZIPRECOVER}" -B out.tlz || test_failed $LINENO
+[ -e out_fixed.tlz ] || test_failed $LINENO
+rm -f out.tlz out_fixed.lz out_fixed.tar.lz out_fixed.tlz ||
+ framework_failure
+
+printf "\ntesting --fec..."
+
+"${LZIPRECOVER}" -Ft "${in_lz}" || test_failed $LINENO
+"${LZIPRECOVER}" -Fc "${in_lz}" -o fecfile.fec || test_failed $LINENO
+cmp "${in_lz}".fec fecfile.fec || test_failed $LINENO
+"${LZIPRECOVER}" -Fc -cn1 "${in_lz}" | cmp fecfile.fec - || test_failed $LINENO
+"${LZIPRECOVER}" -Fc -cn4 "${in_lz}" | cmp fecfile.fec - || test_failed $LINENO
+"${LZIPRECOVER}" -Fc -c --gf16 "${in_lz}" | cmp "${in_lz}".fec16 - ||
+ test_failed $LINENO
+for i in "${bad1_lz}" "${bad2_lz}" "${bad3_lz}" "${bad4_lz}" "${bad5_lz}" \
+ "${bad6_lz}" "${bad7_lz}" "${bad8_lz}" "${bad9_lz}" ; do
+ "${LZIPRECOVER}" -q -Fr --fec-file=fecfile.fec "$i" -o fixed.lz ||
+ test_failed $LINENO "$i"
+ cmp "${in_lz}" "fixed.lz" || test_failed $LINENO "$i"
+ rm -f fixed.lz || framework_failure
+done
+"${LZIPRECOVER}" -Fc "${in_lz}" -o fec/ || test_failed $LINENO
+cmp fec/test.txt.lz.fec fecfile.fec || test_failed $LINENO
+"${LZIPRECOVER}" -Ft "${in_lz}" --fec-file=fec/ || test_failed $LINENO
+rm -rf fec || framework_failure
+mkdir a
+cp "${in_lz}" "${fox6_lz}" a || framework_failure
+"${LZIPRECOVER}" -r -Fc a/ -o fec/ || test_failed $LINENO
+cmp fec/test.txt.lz.fec fecfile.fec || test_failed $LINENO
+[ -e fec/fox6.lz.fec ] || test_failed $LINENO
+"${LZIPRECOVER}" -r -Fc a -o fec/ || test_failed $LINENO
+cmp fec/a/test.txt.lz.fec fecfile.fec || test_failed $LINENO
+[ -e fec/a/fox6.lz.fec ] || test_failed $LINENO
+rm -rf a fec fecfile.fec || framework_failure
+
printf "\ntesting --merge..."
rm -f out.lz || framework_failure
@@ -617,7 +689,7 @@ rm -f out.lz || framework_failure
"${LZIPRECOVER}" -m -o out.lz "${bad1_lz}" "${bad2_lz}" "${bad2_lz}" -q
[ $? = 2 ] || test_failed $LINENO
[ ! -e out.lz ] || test_failed $LINENO
-cat "${bad2_lz}" > bad2.lz || framework_failure
+cp "${bad2_lz}" bad2.lz || framework_failure
"${LZIPRECOVER}" -m -o out.lz "${bad1_lz}" "${bad2_lz}" bad2.lz -q
[ $? = 2 ] || test_failed $LINENO
[ ! -e out.lz ] || test_failed $LINENO
@@ -736,6 +808,7 @@ cmp "${in_lz}" out.lz || test_failed $LINENO
"${LZIPRECOVER}" -mf -o out.lz "${bad5_lz}" "${bad4_lz}" "${bad3_lz}" ||
test_failed $LINENO
cmp "${in_lz}" out.lz || test_failed $LINENO
+rm -f out.lz || framework_failure
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
@@ -760,43 +833,8 @@ cmp in4.lz out4.lz || test_failed $LINENO
cmp in4.lz out4.lz || test_failed $LINENO
rm -f bad345.lz bad453.lz bad534.lz out4.lz || framework_failure
-printf "\ntesting --byte-repair..."
-
-rm -f out.lz || framework_failure
-"${LZIPRECOVER}" -R -o out.lz "${fox6_lz}" || test_failed $LINENO
-[ ! -e out.lz ] || test_failed $LINENO
-"${LZIPRECOVER}" -R -o out.lz "${bad2_lz}" -q
-[ $? = 2 ] || test_failed $LINENO
-[ ! -e out.lz ] || test_failed $LINENO
-"${LZIPRECOVER}" -R -o out.lz "${bad3_lz}" -q
-[ $? = 2 ] || test_failed $LINENO
-[ ! -e out.lz ] || test_failed $LINENO
-"${LZIPRECOVER}" -R -o out.lz "${bad4_lz}" -q
-[ $? = 2 ] || test_failed $LINENO
-[ ! -e out.lz ] || test_failed $LINENO
-"${LZIPRECOVER}" -Rf -o out.lz "${f6b1_lz}" || test_failed $LINENO
-cmp "${fox6_lz}" out.lz || test_failed $LINENO
-"${LZIPRECOVER}" -Rf -o out.lz "${bad1_lz}" || test_failed $LINENO
-cmp "${in_lz}" out.lz || test_failed $LINENO
-"${LZIPRECOVER}" -R -o a/b/c/out.lz "${bad1_lz}" || test_failed $LINENO
-cmp "${in_lz}" a/b/c/out.lz || test_failed $LINENO
-rm -rf a || framework_failure
-
-cat "${f6b1_lz}" > out.lz || framework_failure
-"${LZIPRECOVER}" -R out.lz || test_failed $LINENO
-[ -e out_fixed.lz ] || test_failed $LINENO
-mv out.lz out.tar.lz || framework_failure
-"${LZIPRECOVER}" -R out.tar.lz || test_failed $LINENO
-[ -e out_fixed.tar.lz ] || test_failed $LINENO
-mv out.tar.lz out.tlz || framework_failure
-"${LZIPRECOVER}" -R out.tlz || test_failed $LINENO
-[ -e out_fixed.tlz ] || test_failed $LINENO
-rm -f out.tlz out_fixed.lz out_fixed.tar.lz out_fixed.tlz ||
- framework_failure
-
printf "\ntesting --reproduce..."
-if [ -z "${LZIP_NAME}" ] ; then LZIP_NAME=lzip ; fi
if /bin/sh -c "${LZIP_NAME} -s18KiB" < in > out 2> /dev/null &&
cmp "${in_lz}" out > /dev/null 2>&1 ; then
rm -f out || framework_failure
@@ -878,7 +916,7 @@ done
cat a/b/c/rec*in9.lz | cmp in9.lz - || test_failed $LINENO
rm -rf a || framework_failure
-cat in9.lz > in9t.lz || framework_failure
+cp in9.lz in9t.lz || framework_failure
printf "garbage" >> in9t.lz || framework_failure
"${LZIPRECOVER}" -s in9t.lz || test_failed $LINENO
for i in 01 02 03 04 05 06 07 08 09 ; do
@@ -1011,9 +1049,198 @@ printf "g" | cmp rec2ingin.lz - || test_failed $LINENO
cat rec*ingin.lz | cmp ingin.lz - || test_failed $LINENO
rm -f rec*ingin.lz || framework_failure
-printf "\ntesting --*=damaged..."
+printf "\ntesting --dump/remove/strip..."
+
+"${LZIPRECOVER}" --dump=1 "${in_lz}" -o a/b/c/out.lz || test_failed $LINENO
+cmp "${in_lz}" a/b/c/out.lz || test_failed $LINENO
+rm -rf a || framework_failure
+
+"${LZIPRECOVER}" -s "${num_lz}" -o num.lz || test_failed $LINENO
+[ -e rec9num.lz ] || test_failed $LINENO
+[ ! -e rec10num.lz ] || test_failed $LINENO
+cat rec*num.lz | cmp "${num_lz}" - || test_failed $LINENO
+for i in 1 2 3 4 5 6 7 8 9 ; do
+ "${LZIPRECOVER}" --dump=$i "${num_lz}" | cmp rec${i}num.lz - ||
+ test_failed $LINENO $i
+ "${LZIPRECOVER}" --strip=^$i "${num_lz}" | cmp rec${i}num.lz - ||
+ test_failed $LINENO $i
+ cp "${num_lz}" num.lz || framework_failure
+ "${LZIPRECOVER}" --remove=^$i num.lz || test_failed $LINENO $i
+ cmp rec${i}num.lz num.lz || test_failed $LINENO $i
+done
+"${LZIPRECOVER}" -q --dump=1 in "${num_lz}" > out
+[ $? = 2 ] || test_failed $LINENO
+cmp rec1num.lz out || test_failed $LINENO
+"${LZIPRECOVER}" -q --strip=^1 in "${num_lz}" > out
+[ $? = 2 ] || test_failed $LINENO
+cmp rec1num.lz out || test_failed $LINENO
+
+"${LZIPRECOVER}" --dump=r1 "${num_lz}" | cmp rec9num.lz - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" --dump=d:r3 "${num_lz}" | cmp rec7num.lz - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" --dump=r5:d "${num_lz}" | cmp rec5num.lz - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" --dump=t:r9 "${num_lz}" | cmp rec1num.lz - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" --strip=r^1:t "${num_lz}" | cmp rec9num.lz - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" --strip=d:r^3:t "${num_lz}" | cmp rec7num.lz - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" --strip=r^5:d:t "${num_lz}" | cmp rec5num.lz - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" --strip=d:t:r^9 "${num_lz}" | cmp rec1num.lz - ||
+ test_failed $LINENO
+
+"${LZIPRECOVER}" --dump=1,5 "${num_lz}" > out || test_failed $LINENO
+cat rec1num.lz rec5num.lz | cmp out - || test_failed $LINENO
+"${LZIPRECOVER}" --dump=3,6 "${num_lz}" > out || test_failed $LINENO
+cat rec3num.lz rec6num.lz | cmp out - || test_failed $LINENO
+"${LZIPRECOVER}" --dump=2-4 "${num_lz}" > out || test_failed $LINENO
+cat rec2num.lz rec3num.lz rec4num.lz | cmp out - || test_failed $LINENO
+"${LZIPRECOVER}" --dump=4,6,8 "${num_lz}" > out || test_failed $LINENO
+cat rec4num.lz rec6num.lz rec8num.lz | cmp out - || test_failed $LINENO
+"${LZIPRECOVER}" --strip=^1,5 "${num_lz}" > out || test_failed $LINENO
+cat rec1num.lz rec5num.lz | cmp out - || test_failed $LINENO
+"${LZIPRECOVER}" --strip=^3,6 "${num_lz}" > out || test_failed $LINENO
+cat rec3num.lz rec6num.lz | cmp out - || test_failed $LINENO
+"${LZIPRECOVER}" --strip=^2-4 "${num_lz}" > out || test_failed $LINENO
+cat rec2num.lz rec3num.lz rec4num.lz | cmp out - || test_failed $LINENO
+"${LZIPRECOVER}" --strip=^4,6,8 "${num_lz}" > out || test_failed $LINENO
+cat rec4num.lz rec6num.lz rec8num.lz | cmp out - || test_failed $LINENO
+
+# create a subset tarlz archive
+"${LZIPRECOVER}" --dump=1-2:r1:t "${num_lz}" > out || test_failed $LINENO
+cat rec1num.lz rec2num.lz rec9num.lz | cmp out - || test_failed $LINENO
+"${LZIPRECOVER}" --dump=4-5:r1:t "${num_lz}" > out || test_failed $LINENO
+cat rec4num.lz rec5num.lz rec9num.lz | cmp out - || test_failed $LINENO
+"${LZIPRECOVER}" --dump=7-8:r1:t "${num_lz}" > out || test_failed $LINENO
+cat rec7num.lz rec8num.lz rec9num.lz | cmp out - || test_failed $LINENO
+
+"${LZIPRECOVER}" --dump=1-9 "${num_lz}" | cmp "${num_lz}" - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" --dump=r1-9 "${num_lz}" | cmp "${num_lz}" - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" --dump=1-1000 "${num_lz}" | cmp "${num_lz}" - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" --dump=r1-1000 "${num_lz}" | cmp "${num_lz}" - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" --dump=1-4:r1-4:5 "${num_lz}" | cmp "${num_lz}" - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" --dump=^10 "${num_lz}" | cmp "${num_lz}" - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" --strip=^1-9 "${num_lz}" | cmp "${num_lz}" - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" --strip=r^1-9 "${num_lz}" | cmp "${num_lz}" - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" --strip=^1-1000 "${num_lz}" | cmp "${num_lz}" - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" --strip=r^1-1000 "${num_lz}" | cmp "${num_lz}" - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" --strip=^1-4:r^1-4:^5 "${num_lz}" | cmp "${num_lz}" - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" --strip=10 "${num_lz}" | cmp "${num_lz}" - ||
+ test_failed $LINENO
+
+"${LZIPRECOVER}" -i --dump=r1 "${nbt_lz}" | cmp rec9num.lz - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" -i --dump=r3 "${nbt_lz}" | cmp rec7num.lz - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" -i --dump=r7 "${nbt_lz}" | cmp rec4num.lz - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" -i --strip=r^1:t "${nbt_lz}" | cmp rec9num.lz - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" -i --strip=r^3:t "${nbt_lz}" | cmp rec7num.lz - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" -i --strip=r^7:t "${nbt_lz}" | cmp rec4num.lz - ||
+ test_failed $LINENO
+
+"${LZIPRECOVER}" -i --dump=4 -f -o out "${nbt_lz}" || test_failed $LINENO
+printf "gap" | cmp out - || test_failed $LINENO
+"${LZIPRECOVER}" -i --dump=8 "${nbt_lz}" > out || test_failed $LINENO
+printf "damaged" | cmp out - || test_failed $LINENO
+"${LZIPRECOVER}" -i --dump=tdata "${nbt_lz}" > out || test_failed $LINENO
+printf "trailing data" | cmp out - || test_failed $LINENO
+"${LZIPRECOVER}" -i --dump=4:t "${nbt_lz}" > out || test_failed $LINENO
+printf "gaptrailing data" | cmp out - || test_failed $LINENO
+"${LZIPRECOVER}" -i --dump=4,8:t "${nbt_lz}" > out || test_failed $LINENO
+printf "gapdamagedtrailing data" | cmp out - || test_failed $LINENO
+"${LZIPRECOVER}" -i --dump=4,8 "${nbt_lz}" > out || test_failed $LINENO
+printf "gapdamaged" | cmp out - || test_failed $LINENO
+"${LZIPRECOVER}" -i --dump=damaged "${nbt_lz}" > out || test_failed $LINENO
+printf "gapdamaged" | cmp out - || test_failed $LINENO
+"${LZIPRECOVER}" -i --dump=d:t "${nbt_lz}" > out || test_failed $LINENO
+printf "gapdamagedtrailing data" | cmp out - || test_failed $LINENO
+"${LZIPRECOVER}" -i --strip=^4:t -f -o out "${nbt_lz}" || test_failed $LINENO
+printf "gap" | cmp out - || test_failed $LINENO
+"${LZIPRECOVER}" -i --strip=^8:t "${nbt_lz}" > out || test_failed $LINENO
+printf "damaged" | cmp out - || test_failed $LINENO
+"${LZIPRECOVER}" -i --strip=1-11 "${nbt_lz}" > out || test_failed $LINENO
+cmp empty out || test_failed $LINENO
+"${LZIPRECOVER}" -i --strip=^4 "${nbt_lz}" > out || test_failed $LINENO
+printf "gaptrailing data" | cmp out - || test_failed $LINENO
+"${LZIPRECOVER}" -i --strip=^4,8 "${nbt_lz}" > out || test_failed $LINENO
+printf "gapdamagedtrailing data" | cmp out - || test_failed $LINENO
+"${LZIPRECOVER}" -i --strip=^4,8:t "${nbt_lz}" > out || test_failed $LINENO
+printf "gapdamaged" | cmp out - || test_failed $LINENO
+"${LZIPRECOVER}" -i --strip=r^4,8:t "${nbt_lz}" > out || test_failed $LINENO
+printf "gapdamaged" | cmp out - || test_failed $LINENO
+"${LZIPRECOVER}" -i --strip=r^4,8 "${nbt_lz}" > out || test_failed $LINENO
+printf "gapdamagedtrailing data" | cmp out - || test_failed $LINENO
+
+cp "${num_lz}" num.lz || framework_failure
+"${LZIPRECOVER}" --remove=1-3,5,7,9 num.lz || test_failed $LINENO
+cat rec4num.lz rec6num.lz rec8num.lz | cmp num.lz - || test_failed $LINENO
+cp "${num_lz}" num.lz || framework_failure
+"${LZIPRECOVER}" --remove=^4,6,8 num.lz || test_failed $LINENO
+cat rec4num.lz rec6num.lz rec8num.lz | cmp num.lz - || test_failed $LINENO
+cp "${num_lz}" num.lz || framework_failure
+"${LZIPRECOVER}" --remove=r1,3,5,7-9 num.lz || test_failed $LINENO
+cat rec4num.lz rec6num.lz rec8num.lz | cmp num.lz - || test_failed $LINENO
+cp "${num_lz}" num.lz || framework_failure
+"${LZIPRECOVER}" --remove=r^2,4,6 num.lz || test_failed $LINENO
+cat rec4num.lz rec6num.lz rec8num.lz | cmp num.lz - || test_failed $LINENO
+rm -f num.lz || framework_failure
+
+cp "${nbt_lz}" nbt.lz || framework_failure
+"${LZIPRECOVER}" -i --remove=4,8:tdata nbt.lz || test_failed $LINENO
+cmp "${num_lz}" nbt.lz || test_failed $LINENO
+cp "${nbt_lz}" nbt.lz || framework_failure
+"${LZIPRECOVER}" -i --remove=r4,8:tdata nbt.lz || test_failed $LINENO
+cmp "${num_lz}" nbt.lz || test_failed $LINENO
+cp "${nbt_lz}" nbt.lz || framework_failure
+"${LZIPRECOVER}" --remove=damaged:tdata nbt.lz || test_failed $LINENO
+cmp "${num_lz}" nbt.lz || test_failed $LINENO
+rm -f rec*num.lz nbt.lz || framework_failure
-cat "${in_lz}" > in.lz || framework_failure
+for i in 1 2 3 4 5 6 7 8 9 10 ; do
+ "${LZIPRECOVER}" -i --strip=1-$i "${nbt_lz}" > out ||
+ test_failed $LINENO $i
+ cp "${nbt_lz}" nbt.lz || framework_failure
+ "${LZIPRECOVER}" -i --remove=1-$i nbt.lz || test_failed $LINENO $i
+ cmp nbt.lz out || test_failed $LINENO $i
+done
+rm -f nbt.lz || framework_failure
+
+cp "${in_em}" test_3m.txt.lz || framework_failure
+"${LZIPRECOVER}" --remove=empty test_3m.txt.lz || test_failed $LINENO
+"${LZIPRECOVER}" -M test_3m.txt.lz | cmp "${testdir}"/test_3m.txt.lz.md5 - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" --dump=2,4,7 "${in_em}" | cmp test_3m.txt.lz - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" --strip=e "${in_em}" | cmp test_3m.txt.lz - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" --strip=e "${in_em}" | cmp test_3m.txt.lz - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" --strip=1,3,5-6,8 "${in_em}" | cmp test_3m.txt.lz - ||
+ test_failed $LINENO
+"${LZIPRECOVER}" --dump=emp "${in_em}" | "${LZIP}" -d --ignore-empty | \
+ cmp empty - || test_failed $LINENO
+rm -f test_3m.txt.lz || framework_failure
+
+printf "\ntesting --dump/remove/strip=damaged..."
+
+cp "${in_lz}" in.lz || framework_failure
cat "${in_lz}" in > int.lz || framework_failure
"${LZIPRECOVER}" --dump=damaged in.lz > out || test_failed $LINENO
cmp empty out || test_failed $LINENO
@@ -1043,7 +1270,7 @@ cmp in9.lz out || test_failed $LINENO
cmp in9t.lz out || test_failed $LINENO
"${LZIPRECOVER}" --remove=damaged in9t.lz || test_failed $LINENO
cat in9.lz in | cmp in9t.lz - || test_failed $LINENO
-cat in9.lz > in9t.lz || framework_failure
+cp in9.lz in9t.lz || framework_failure
"${LZIPRECOVER}" --remove=damaged in9t.lz || test_failed $LINENO
cmp in9.lz in9t.lz || test_failed $LINENO
rm -f in9t.lz || framework_failure
@@ -1072,7 +1299,7 @@ cmp "${f6b1_lz}" out || test_failed $LINENO
cmp empty out || test_failed $LINENO
"${LZIPRECOVER}" -q --strip=damaged f6bt.lz > out || test_failed $LINENO
cmp empty out || test_failed $LINENO
-cat "${f6b1_lz}" > f6b.lz || framework_failure
+cp "${f6b1_lz}" f6b.lz || framework_failure
"${LZIPRECOVER}" -q --remove=damaged f6b.lz
[ $? = 2 ] || test_failed $LINENO
cmp "${f6b1_lz}" f6b.lz || test_failed $LINENO
@@ -1094,7 +1321,7 @@ cat "${fox_lz}" "${fox_lz}" "${fox_lz}" "${fox_lz}" "${fox_lz}" > fox5.lz ||
cmp fox5.lz out || test_failed $LINENO
"${LZIPRECOVER}" --strip=damaged f6bt.lz > out || test_failed $LINENO
cat fox5.lz in | cmp out - || test_failed $LINENO
-cat "${f6b2_lz}" > f6b.lz || framework_failure
+cp "${f6b2_lz}" f6b.lz || framework_failure
"${LZIPRECOVER}" --remove=damaged f6b.lz || test_failed $LINENO
cmp fox5.lz f6b.lz || test_failed $LINENO
"${LZIPRECOVER}" --remove=damaged f6bt.lz || test_failed $LINENO
@@ -1113,7 +1340,7 @@ cat "${fox_lz}" "${fox_lz}" "${fox_lz}" > fox3.lz || framework_failure
cmp fox3.lz out || test_failed $LINENO
"${LZIPRECOVER}" --strip=damaged f6bt.lz > out || test_failed $LINENO
cat fox3.lz in | cmp out - || test_failed $LINENO
-cat "${f6b3_lz}" > f6b.lz || framework_failure
+cp "${f6b3_lz}" f6b.lz || framework_failure
"${LZIPRECOVER}" --remove=damaged f6b.lz || test_failed $LINENO
cmp fox3.lz f6b.lz || test_failed $LINENO
"${LZIPRECOVER}" --remove=damaged f6bt.lz || test_failed $LINENO
@@ -1134,7 +1361,7 @@ for i in "${f6b4_lz}" "${f6b5_lz}" ; do
"${LZIPRECOVER}" --strip=damaged f6bt.lz > out ||
test_failed $LINENO "$i"
cmp fox4.lz out || test_failed $LINENO "$i"
- cat "$i" > f6b.lz || framework_failure
+ cp "$i" f6b.lz || framework_failure
"${LZIPRECOVER}" --remove=damaged f6b.lz || test_failed $LINENO "$i"
cmp fox4.lz f6b.lz || test_failed $LINENO "$i"
"${LZIPRECOVER}" --remove=damaged f6bt.lz || test_failed $LINENO "$i"
@@ -1151,7 +1378,7 @@ cat fox5.lz out | cmp "${f6b6_lz}" - || test_failed $LINENO
cmp fox5.lz out || test_failed $LINENO
"${LZIPRECOVER}" --strip=damaged f6bt.lz > out || test_failed $LINENO
cat fox5.lz in | cmp out - || test_failed $LINENO
-cat "${f6b6_lz}" > f6b.lz || framework_failure
+cp "${f6b6_lz}" f6b.lz || framework_failure
"${LZIPRECOVER}" --remove=damaged f6b.lz || test_failed $LINENO
cmp fox5.lz f6b.lz || test_failed $LINENO
"${LZIPRECOVER}" --remove=damaged f6bt.lz || test_failed $LINENO
@@ -1171,7 +1398,7 @@ for i in "${f6s1_lz}" "${f6s2_lz}" ; do
"${LZIPRECOVER}" -q --strip=damaged f6bt.lz > out ||
test_failed $LINENO "$i"
cmp empty out || test_failed $LINENO "$i"
- cat "$i" > f6b.lz || framework_failure
+ cp "$i" f6b.lz || framework_failure
"${LZIPRECOVER}" -q --remove=damaged f6b.lz
[ $? = 2 ] || test_failed $LINENO "$i"
cmp "$i" f6b.lz || test_failed $LINENO "$i"
@@ -1193,13 +1420,13 @@ for i in "${f6s3_lz}" "${f6s4_lz}" "${f6s5_lz}" "${f6s6_lz}" ; do
"${LZIPRECOVER}" --strip=damaged f6bt.lz > out ||
test_failed $LINENO "$i"
cat "$i" in | cmp out - || test_failed $LINENO "$i"
- cat "$i" > f6b.lz || framework_failure
+ cp "$i" f6b.lz || framework_failure
"${LZIPRECOVER}" --remove=damaged f6b.lz || test_failed $LINENO "$i"
cmp "$i" f6b.lz || test_failed $LINENO "$i"
"${LZIPRECOVER}" --remove=damaged f6bt.lz || test_failed $LINENO "$i"
cat "$i" in | cmp f6bt.lz - || test_failed $LINENO "$i"
done
-rm -f f6b.lz f6bt.lz || framework_failure
+rm -f f6b.lz f6bt.lz empty || framework_failure
cat ingin.lz "${inD}" > ingint.lz || framework_failure
"${LZIPRECOVER}" --dump=damaged ingin.lz > out || test_failed $LINENO
@@ -1210,7 +1437,7 @@ printf "g" | cmp out - || test_failed $LINENO
cmp in2.lz out || test_failed $LINENO
"${LZIPRECOVER}" --strip=damaged ingint.lz > out || test_failed $LINENO
cat "${in_lz}" "${in_lz}" "${inD}" | cmp out - || test_failed $LINENO
-cat ingin.lz > ingin2.lz || framework_failure
+cp ingin.lz ingin2.lz || framework_failure
"${LZIPRECOVER}" --remove=damaged ingin2.lz || test_failed $LINENO
cmp in2.lz ingin2.lz || test_failed $LINENO
"${LZIPRECOVER}" --remove=damaged ingint.lz || test_failed $LINENO
@@ -1253,7 +1480,7 @@ cat fox5.lz "${in_lz}" | cmp out - || test_failed $LINENO
test_failed $LINENO
cat fox5.lz "${in_lz}" | cmp out - || test_failed $LINENO
#
-cat "${f6b2_lz}" > f6b.lz || framework_failure
+cp "${f6b2_lz}" f6b.lz || framework_failure
"${LZIPRECOVER}" -q --remove=damaged f6b.lz bad2t.lz f6bt.lz
[ $? = 2 ] || test_failed $LINENO
cat "${bad2_lz}" in | cmp bad2t.lz - || test_failed $LINENO
@@ -1262,7 +1489,7 @@ cat fox5.lz in | cmp f6bt.lz - || test_failed $LINENO
cat "${bad2_lz}" in > bad2t.lz || framework_failure
cat "${fox6_lz}" "${inD}" > fox6t.lz || framework_failure
cat "${f6b1_lz}" in > f6abt.lz || framework_failure
-cat "${f6b2_lz}" > f6b.lz || framework_failure
+cp "${f6b2_lz}" f6b.lz || framework_failure
cat "${f6b2_lz}" in > f6bt.lz || framework_failure
"${LZIPRECOVER}" -q --remove=d:t fox6t.lz f6abt.lz f6b.lz bad2t.lz f6bt.lz
[ $? = 2 ] || test_failed $LINENO
@@ -1271,7 +1498,8 @@ cat "${f6b1_lz}" in | cmp f6abt.lz - || test_failed $LINENO
cmp "${fox6_lz}" fox6t.lz || test_failed $LINENO
cmp fox5.lz f6b.lz || test_failed $LINENO
cmp fox5.lz f6bt.lz || test_failed $LINENO
-rm -f fox6t.lz f6b.lz f6bt.lz bad2t.lz fox5.lz out2 out4 || framework_failure
+rm -f fox6t.lz f6b.lz f6bt.lz f6abt.lz bad2t.lz fox5.lz out2 out4 ||
+ framework_failure
printf "\ntesting trailing data..."
@@ -1338,196 +1566,6 @@ for i in "${f6s3_lz}" "${f6s4_lz}" "${f6s5_lz}" "${f6s6_lz}" ; do
rm -f out tdata f6t.lz || framework_failure
done
-printf "\ntesting --dump/remove/strip..."
-
-"${LZIPRECOVER}" --dump=1 "${in_lz}" -o a/b/c/out.lz || test_failed $LINENO
-cmp "${in_lz}" a/b/c/out.lz || test_failed $LINENO
-rm -rf a || framework_failure
-
-"${LZIPRECOVER}" -s "${num_lz}" -o num.lz || test_failed $LINENO
-[ -e rec9num.lz ] || test_failed $LINENO
-[ ! -e rec10num.lz ] || test_failed $LINENO
-cat rec*num.lz | cmp "${num_lz}" - || test_failed $LINENO
-for i in 1 2 3 4 5 6 7 8 9 ; do
- "${LZIPRECOVER}" --dump=$i "${num_lz}" | cmp rec${i}num.lz - ||
- test_failed $LINENO $i
- "${LZIPRECOVER}" --strip=^$i "${num_lz}" | cmp rec${i}num.lz - ||
- test_failed $LINENO $i
- cat "${num_lz}" > num.lz || framework_failure
- "${LZIPRECOVER}" --remove=^$i num.lz || test_failed $LINENO $i
- cmp rec${i}num.lz num.lz || test_failed $LINENO $i
-done
-"${LZIPRECOVER}" -q --dump=1 in "${num_lz}" > out
-[ $? = 2 ] || test_failed $LINENO
-cmp rec1num.lz out || test_failed $LINENO
-"${LZIPRECOVER}" -q --strip=^1 in "${num_lz}" > out
-[ $? = 2 ] || test_failed $LINENO
-cmp rec1num.lz out || test_failed $LINENO
-
-"${LZIPRECOVER}" --dump=r1 "${num_lz}" | cmp rec9num.lz - ||
- test_failed $LINENO
-"${LZIPRECOVER}" --dump=d:r3 "${num_lz}" | cmp rec7num.lz - ||
- test_failed $LINENO
-"${LZIPRECOVER}" --dump=r5:d "${num_lz}" | cmp rec5num.lz - ||
- test_failed $LINENO
-"${LZIPRECOVER}" --dump=t:r9 "${num_lz}" | cmp rec1num.lz - ||
- test_failed $LINENO
-"${LZIPRECOVER}" --strip=r^1:t "${num_lz}" | cmp rec9num.lz - ||
- test_failed $LINENO
-"${LZIPRECOVER}" --strip=d:r^3:t "${num_lz}" | cmp rec7num.lz - ||
- test_failed $LINENO
-"${LZIPRECOVER}" --strip=r^5:d:t "${num_lz}" | cmp rec5num.lz - ||
- test_failed $LINENO
-"${LZIPRECOVER}" --strip=d:t:r^9 "${num_lz}" | cmp rec1num.lz - ||
- test_failed $LINENO
-
-"${LZIPRECOVER}" --dump=1,5 "${num_lz}" > out || test_failed $LINENO
-cat rec1num.lz rec5num.lz | cmp out - || test_failed $LINENO
-"${LZIPRECOVER}" --dump=3,6 "${num_lz}" > out || test_failed $LINENO
-cat rec3num.lz rec6num.lz | cmp out - || test_failed $LINENO
-"${LZIPRECOVER}" --dump=2-4 "${num_lz}" > out || test_failed $LINENO
-cat rec2num.lz rec3num.lz rec4num.lz | cmp out - || test_failed $LINENO
-"${LZIPRECOVER}" --dump=4,6,8 "${num_lz}" > out || test_failed $LINENO
-cat rec4num.lz rec6num.lz rec8num.lz | cmp out - || test_failed $LINENO
-"${LZIPRECOVER}" --strip=^1,5 "${num_lz}" > out || test_failed $LINENO
-cat rec1num.lz rec5num.lz | cmp out - || test_failed $LINENO
-"${LZIPRECOVER}" --strip=^3,6 "${num_lz}" > out || test_failed $LINENO
-cat rec3num.lz rec6num.lz | cmp out - || test_failed $LINENO
-"${LZIPRECOVER}" --strip=^2-4 "${num_lz}" > out || test_failed $LINENO
-cat rec2num.lz rec3num.lz rec4num.lz | cmp out - || test_failed $LINENO
-"${LZIPRECOVER}" --strip=^4,6,8 "${num_lz}" > out || test_failed $LINENO
-cat rec4num.lz rec6num.lz rec8num.lz | cmp out - || test_failed $LINENO
-
-# create a subset tarlz archive
-"${LZIPRECOVER}" --dump=1-2:r1:t "${num_lz}" > out || test_failed $LINENO
-cat rec1num.lz rec2num.lz rec9num.lz | cmp out - || test_failed $LINENO
-"${LZIPRECOVER}" --dump=4-5:r1:t "${num_lz}" > out || test_failed $LINENO
-cat rec4num.lz rec5num.lz rec9num.lz | cmp out - || test_failed $LINENO
-"${LZIPRECOVER}" --dump=7-8:r1:t "${num_lz}" > out || test_failed $LINENO
-cat rec7num.lz rec8num.lz rec9num.lz | cmp out - || test_failed $LINENO
-
-"${LZIPRECOVER}" --dump=1-9 "${num_lz}" | cmp "${num_lz}" - ||
- test_failed $LINENO
-"${LZIPRECOVER}" --dump=r1-9 "${num_lz}" | cmp "${num_lz}" - ||
- test_failed $LINENO
-"${LZIPRECOVER}" --dump=1-1000 "${num_lz}" | cmp "${num_lz}" - ||
- test_failed $LINENO
-"${LZIPRECOVER}" --dump=r1-1000 "${num_lz}" | cmp "${num_lz}" - ||
- test_failed $LINENO
-"${LZIPRECOVER}" --dump=1-4:r1-4:5 "${num_lz}" | cmp "${num_lz}" - ||
- test_failed $LINENO
-"${LZIPRECOVER}" --dump=^10 "${num_lz}" | cmp "${num_lz}" - ||
- test_failed $LINENO
-"${LZIPRECOVER}" --strip=^1-9 "${num_lz}" | cmp "${num_lz}" - ||
- test_failed $LINENO
-"${LZIPRECOVER}" --strip=r^1-9 "${num_lz}" | cmp "${num_lz}" - ||
- test_failed $LINENO
-"${LZIPRECOVER}" --strip=^1-1000 "${num_lz}" | cmp "${num_lz}" - ||
- test_failed $LINENO
-"${LZIPRECOVER}" --strip=r^1-1000 "${num_lz}" | cmp "${num_lz}" - ||
- test_failed $LINENO
-"${LZIPRECOVER}" --strip=^1-4:r^1-4:^5 "${num_lz}" | cmp "${num_lz}" - ||
- test_failed $LINENO
-"${LZIPRECOVER}" --strip=10 "${num_lz}" | cmp "${num_lz}" - ||
- test_failed $LINENO
-
-"${LZIPRECOVER}" -i --dump=r1 "${nbt_lz}" | cmp rec9num.lz - ||
- test_failed $LINENO
-"${LZIPRECOVER}" -i --dump=r3 "${nbt_lz}" | cmp rec7num.lz - ||
- test_failed $LINENO
-"${LZIPRECOVER}" -i --dump=r7 "${nbt_lz}" | cmp rec4num.lz - ||
- test_failed $LINENO
-"${LZIPRECOVER}" -i --strip=r^1:t "${nbt_lz}" | cmp rec9num.lz - ||
- test_failed $LINENO
-"${LZIPRECOVER}" -i --strip=r^3:t "${nbt_lz}" | cmp rec7num.lz - ||
- test_failed $LINENO
-"${LZIPRECOVER}" -i --strip=r^7:t "${nbt_lz}" | cmp rec4num.lz - ||
- test_failed $LINENO
-
-"${LZIPRECOVER}" -i --dump=4 -f -o out "${nbt_lz}" || test_failed $LINENO
-printf "gap" | cmp out - || test_failed $LINENO
-"${LZIPRECOVER}" -i --dump=8 "${nbt_lz}" > out || test_failed $LINENO
-printf "damaged" | cmp out - || test_failed $LINENO
-"${LZIPRECOVER}" -i --dump=tdata "${nbt_lz}" > out || test_failed $LINENO
-printf "trailing data" | cmp out - || test_failed $LINENO
-"${LZIPRECOVER}" -i --dump=4:t "${nbt_lz}" > out || test_failed $LINENO
-printf "gaptrailing data" | cmp out - || test_failed $LINENO
-"${LZIPRECOVER}" -i --dump=4,8:t "${nbt_lz}" > out || test_failed $LINENO
-printf "gapdamagedtrailing data" | cmp out - || test_failed $LINENO
-"${LZIPRECOVER}" -i --dump=4,8 "${nbt_lz}" > out || test_failed $LINENO
-printf "gapdamaged" | cmp out - || test_failed $LINENO
-"${LZIPRECOVER}" -i --dump=damaged "${nbt_lz}" > out || test_failed $LINENO
-printf "gapdamaged" | cmp out - || test_failed $LINENO
-"${LZIPRECOVER}" -i --dump=d:t "${nbt_lz}" > out || test_failed $LINENO
-printf "gapdamagedtrailing data" | cmp out - || test_failed $LINENO
-"${LZIPRECOVER}" -i --strip=^4:t -f -o out "${nbt_lz}" || test_failed $LINENO
-printf "gap" | cmp out - || test_failed $LINENO
-"${LZIPRECOVER}" -i --strip=^8:t "${nbt_lz}" > out || test_failed $LINENO
-printf "damaged" | cmp out - || test_failed $LINENO
-"${LZIPRECOVER}" -i --strip=1-11 "${nbt_lz}" > out || test_failed $LINENO
-cmp empty out || test_failed $LINENO
-"${LZIPRECOVER}" -i --strip=^4 "${nbt_lz}" > out || test_failed $LINENO
-printf "gaptrailing data" | cmp out - || test_failed $LINENO
-"${LZIPRECOVER}" -i --strip=^4,8 "${nbt_lz}" > out || test_failed $LINENO
-printf "gapdamagedtrailing data" | cmp out - || test_failed $LINENO
-"${LZIPRECOVER}" -i --strip=^4,8:t "${nbt_lz}" > out || test_failed $LINENO
-printf "gapdamaged" | cmp out - || test_failed $LINENO
-"${LZIPRECOVER}" -i --strip=r^4,8:t "${nbt_lz}" > out || test_failed $LINENO
-printf "gapdamaged" | cmp out - || test_failed $LINENO
-"${LZIPRECOVER}" -i --strip=r^4,8 "${nbt_lz}" > out || test_failed $LINENO
-printf "gapdamagedtrailing data" | cmp out - || test_failed $LINENO
-
-cat "${num_lz}" > num.lz || framework_failure
-"${LZIPRECOVER}" --remove=1-3,5,7,9 num.lz || test_failed $LINENO
-cat rec4num.lz rec6num.lz rec8num.lz | cmp num.lz - || test_failed $LINENO
-cat "${num_lz}" > num.lz || framework_failure
-"${LZIPRECOVER}" --remove=^4,6,8 num.lz || test_failed $LINENO
-cat rec4num.lz rec6num.lz rec8num.lz | cmp num.lz - || test_failed $LINENO
-cat "${num_lz}" > num.lz || framework_failure
-"${LZIPRECOVER}" --remove=r1,3,5,7-9 num.lz || test_failed $LINENO
-cat rec4num.lz rec6num.lz rec8num.lz | cmp num.lz - || test_failed $LINENO
-cat "${num_lz}" > num.lz || framework_failure
-"${LZIPRECOVER}" --remove=r^2,4,6 num.lz || test_failed $LINENO
-cat rec4num.lz rec6num.lz rec8num.lz | cmp num.lz - || test_failed $LINENO
-
-cat "${nbt_lz}" > nbt.lz || framework_failure
-"${LZIPRECOVER}" -i --remove=4,8:tdata nbt.lz || test_failed $LINENO
-cmp "${num_lz}" nbt.lz || test_failed $LINENO
-cat "${nbt_lz}" > nbt.lz || framework_failure
-"${LZIPRECOVER}" -i --remove=r4,8:tdata nbt.lz || test_failed $LINENO
-cmp "${num_lz}" nbt.lz || test_failed $LINENO
-cat "${nbt_lz}" > nbt.lz || framework_failure
-"${LZIPRECOVER}" --remove=damaged:tdata nbt.lz || test_failed $LINENO
-cmp "${num_lz}" nbt.lz || test_failed $LINENO
-rm -f rec*num.lz nbt.lz || framework_failure
-
-for i in 1 2 3 4 5 6 7 8 9 10 ; do
- "${LZIPRECOVER}" -i --strip=1-$i "${nbt_lz}" > out ||
- test_failed $LINENO $i
- cat "${nbt_lz}" > nbt.lz || framework_failure
- "${LZIPRECOVER}" -i --remove=1-$i nbt.lz || test_failed $LINENO $i
- cmp nbt.lz out || test_failed $LINENO $i
-done
-rm -f nbt.lz || framework_failure
-
-cat "${in_em}" > test_3m.txt.lz || framework_failure
-"${LZIPRECOVER}" --remove=empty test_3m.txt.lz || test_failed $LINENO
-"${LZIPRECOVER}" -M test_3m.txt.lz | cmp "${testdir}"/test_3m.txt.lz.md5 - ||
- test_failed $LINENO
-"${LZIPRECOVER}" --dump=2,4,7 "${in_em}" | cmp test_3m.txt.lz - ||
- test_failed $LINENO
-"${LZIPRECOVER}" --strip=e "${in_em}" | cmp test_3m.txt.lz - ||
- test_failed $LINENO
-"${LZIPRECOVER}" --empty-error --strip=e "${in_em}" | cmp test_3m.txt.lz - ||
- test_failed $LINENO
-"${LZIPRECOVER}" --strip=1,3,5-6,8 "${in_em}" | cmp test_3m.txt.lz - ||
- test_failed $LINENO
-"${LZIPRECOVER}" -q --strip=1,3,5-6,8 --empty-error "${in_em}" > out
-[ $? = 2 ] || test_failed $LINENO
-"${LZIPRECOVER}" --dump=emp "${in_em}" | "${LZIP}" -d | cmp empty - ||
- test_failed $LINENO
-rm -f test_3m.txt.lz empty out || framework_failure
-
echo
if [ ${fail} = 0 ] ; then
echo "tests completed successfully."
diff --git a/testsuite/fox6_mark.lz b/testsuite/fox6_mark.lz
deleted file mode 100644
index 32b2ac0..0000000
--- a/testsuite/fox6_mark.lz
+++ /dev/null
Binary files differ
diff --git a/testsuite/fox6_nz.lz b/testsuite/fox6_nz.lz
new file mode 100644
index 0000000..cd5b481
--- /dev/null
+++ b/testsuite/fox6_nz.lz
Binary files differ
diff --git a/testsuite/test.txt b/testsuite/test.txt
index 9196a3a..423f0c0 100644
--- a/testsuite/test.txt
+++ b/testsuite/test.txt
@@ -1,8 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
@@ -339,8 +338,7 @@ Public License instead of this License.
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
diff --git a/testsuite/test.txt.lz b/testsuite/test.txt.lz
index 22cea6e..5dc169f 100644
--- a/testsuite/test.txt.lz
+++ b/testsuite/test.txt.lz
Binary files differ
diff --git a/testsuite/test.txt.lz.fec b/testsuite/test.txt.lz.fec
new file mode 100644
index 0000000..265ec6b
--- /dev/null
+++ b/testsuite/test.txt.lz.fec
Binary files differ
diff --git a/testsuite/test.txt.lz.fec16 b/testsuite/test.txt.lz.fec16
new file mode 100644
index 0000000..534d233
--- /dev/null
+++ b/testsuite/test.txt.lz.fec16
Binary files differ
diff --git a/testsuite/test.txt.lzma b/testsuite/test.txt.lzma
index 53e54ea..091c023 100644
--- a/testsuite/test.txt.lzma
+++ b/testsuite/test.txt.lzma
Binary files differ
diff --git a/testsuite/test21723.txt b/testsuite/test21636.txt
index 7194547..7194547 100644
--- a/testsuite/test21723.txt
+++ b/testsuite/test21636.txt
diff --git a/testsuite/test_3m.txt.lz.md5 b/testsuite/test_3m.txt.lz.md5
index 5bec6bc..e9f47d7 100644
--- a/testsuite/test_3m.txt.lz.md5
+++ b/testsuite/test_3m.txt.lz.md5
@@ -1 +1 @@
-6a6bb58464ec8567eab17015064d0c5b test_3m.txt.lz
+aa8ca65001d627f89e7494fa829e710f test_3m.txt.lz
diff --git a/testsuite/test_bad1.lz b/testsuite/test_bad1.lz
index 2129c90..5300a0c 100644
--- a/testsuite/test_bad1.lz
+++ b/testsuite/test_bad1.lz
Binary files differ
diff --git a/testsuite/test_bad2.lz b/testsuite/test_bad2.lz
index e013c34..8691377 100644
--- a/testsuite/test_bad2.lz
+++ b/testsuite/test_bad2.lz
Binary files differ
diff --git a/testsuite/test_bad3.lz b/testsuite/test_bad3.lz
index 0ae9e7d..5f82877 100644
--- a/testsuite/test_bad3.lz
+++ b/testsuite/test_bad3.lz
Binary files differ
diff --git a/testsuite/test_bad4.lz b/testsuite/test_bad4.lz
index ddb0d6b..c816609 100644
--- a/testsuite/test_bad4.lz
+++ b/testsuite/test_bad4.lz
Binary files differ
diff --git a/testsuite/test_bad5.lz b/testsuite/test_bad5.lz
index 6fab91c..7b002b8 100644
--- a/testsuite/test_bad5.lz
+++ b/testsuite/test_bad5.lz
Binary files differ
diff --git a/testsuite/test_bad6.lz b/testsuite/test_bad6.lz
index cfea88c..554b3f8 100644
--- a/testsuite/test_bad6.lz
+++ b/testsuite/test_bad6.lz
Binary files differ
diff --git a/testsuite/test_bad6.txt b/testsuite/test_bad6.txt
index b47462e..cd4dc0a 100644
--- a/testsuite/test_bad6.txt
+++ b/testsuite/test_bad6.txt
@@ -1,6 +1,3 @@
-) You can apply it to
-your programs, too.
-
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
@@ -23,4 +20,10 @@ rights.
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
- Also, for each author's protection and ours, we want to \ No newline at end of file
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
diff --git a/testsuite/test_bad7.lz b/testsuite/test_bad7.lz
index 77f2b85..4275cfc 100644
--- a/testsuite/test_bad7.lz
+++ b/testsuite/test_bad7.lz
Binary files differ
diff --git a/testsuite/test_bad7.txt b/testsuite/test_bad7.txt
index be54c7c..ba4ade5 100644
--- a/testsuite/test_bad7.txt
+++ b/testsuite/test_bad7.txt
@@ -1,13 +1,3 @@
-, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
The precise terms and conditions for copying, distribution and
modification follow.
@@ -212,4 +202,22 @@ of promoting the sharing and reuse of software generally.
NO WARRANTY
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY \ No newline at end of file
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
diff --git a/testsuite/test_bad8.lz b/testsuite/test_bad8.lz
index fca701b..6c8b878 100644
--- a/testsuite/test_bad8.lz
+++ b/testsuite/test_bad8.lz
Binary files differ
diff --git a/testsuite/test_bad9.lz b/testsuite/test_bad9.lz
index becb0ec..3851682 100644
--- a/testsuite/test_bad9.lz
+++ b/testsuite/test_bad9.lz
Binary files differ
diff --git a/testsuite/test_bad9.txt b/testsuite/test_bad9.txt
index b72a626..0bbf61f 100644
--- a/testsuite/test_bad9.txt
+++ b/testsuite/test_bad9.txt
@@ -1,5 +1,13 @@
-General
-Public License instead of this License.
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
diff --git a/testsuite/test_em.txt.lz b/testsuite/test_em.txt.lz
index 7e96250..9e093be 100644
--- a/testsuite/test_em.txt.lz
+++ b/testsuite/test_em.txt.lz
Binary files differ