diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 10:16:13 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 10:16:13 +0000 |
commit | f8ec1a9b6de5ccde4220017676cbae1c16205fd1 (patch) | |
tree | c76650bdeec7078ff209e394b3d091bbbabb40f9 /testsuite/check.sh | |
parent | Adding debian version 1.13~rc1-1. (diff) | |
download | lziprecover-f8ec1a9b6de5ccde4220017676cbae1c16205fd1.tar.xz lziprecover-f8ec1a9b6de5ccde4220017676cbae1c16205fd1.zip |
Merging upstream version 1.13~rc2.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'testsuite/check.sh')
-rwxr-xr-x | testsuite/check.sh | 73 |
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 |