summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtestsuite/check.sh73
-rw-r--r--testsuite/test921-1921.txt17
2 files changed, 58 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
diff --git a/testsuite/test921-1921.txt b/testsuite/test921-1921.txt
new file mode 100644
index 0000000..70d4860
--- /dev/null
+++ b/testsuite/test921-1921.txt
@@ -0,0 +1,17 @@
+ 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
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.