From 430cefe5574348b6ac55450ea8ffce2459affe3e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 7 Nov 2015 06:02:49 +0100 Subject: Merging upstream version 1.4~rc1. Signed-off-by: Daniel Baumann --- testsuite/check.sh | 50 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 20 deletions(-) (limited to 'testsuite') diff --git a/testsuite/check.sh b/testsuite/check.sh index 8408109..c4f612e 100755 --- a/testsuite/check.sh +++ b/testsuite/check.sh @@ -22,41 +22,51 @@ mkdir tmp cd "${objdir}"/tmp cat "${testdir}"/test.txt > in || framework_failure -cat in in > in2 || framework_failure -cat "${testdir}"/test.txt.lz > in.lz || framework_failure -cat in.lz in.lz > in2.lz || framework_failure +in_lz="${testdir}"/test.txt.lz fail=0 printf "testing lunzip-%s..." "$2" -"${LZIP}" -t "${testdir}"/test.txt.lz || fail=1 -"${LZIP}" -cd "${testdir}"/test.txt.lz > copy || fail=1 +"${LZIP}" -tq in +if [ $? = 2 ] ; then printf . ; else fail=1 ; printf - ; fi +"${LZIP}" -tq < in +if [ $? = 2 ] ; then printf . ; else fail=1 ; printf - ; fi +"${LZIP}" -cdq in +if [ $? = 2 ] ; then printf . ; else fail=1 ; printf - ; fi +"${LZIP}" -cdq < in +if [ $? = 2 ] ; then printf . ; else fail=1 ; printf - ; fi +dd if="${in_lz}" bs=1 count=6 2> /dev/null | "${LZIP}" -tq +if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi +dd if="${in_lz}" bs=1 count=20 2> /dev/null | "${LZIP}" -tq +if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi + +"${LZIP}" -t "${in_lz}" || fail=1 +"${LZIP}" -cd "${in_lz}" > copy || fail=1 cmp in copy || fail=1 printf . -"${LZIP}" -t in2.lz || fail=1 +printf "to be overwritten" > copy || framework_failure +"${LZIP}" -df -o copy < "${in_lz}" || fail=1 +cmp in copy || fail=1 printf . -"${LZIP}" -cd in2.lz > copy2 || fail=1 -cmp in2 copy2 || fail=1 + +cat "${in_lz}" > anyothername || framework_failure +"${LZIP}" -d anyothername || fail=1 +cmp in anyothername.out || fail=1 printf . -cat in2.lz > copy2.lz || framework_failure -printf "garbage" >> copy2.lz || framework_failure -printf "to be overwritten" > copy2 || framework_failure +cat in in > in2 || framework_failure +cat "${in_lz}" "${in_lz}" > copy2.lz || framework_failure "${LZIP}" -t copy2.lz || fail=1 printf . -"${LZIP}" -dfk copy2.lz || fail=1 +"${LZIP}" -cd copy2.lz > copy2 || fail=1 cmp in2 copy2 || fail=1 printf . -printf "to be overwritten" > copy || framework_failure -"${LZIP}" -df -o copy < in.lz || fail=1 -cmp in copy || fail=1 -printf . - -cat in.lz > anyothername || framework_failure -"${LZIP}" -d anyothername || fail=1 -cmp in anyothername.out || fail=1 +printf "garbage" >> copy2.lz || framework_failure +printf "to be overwritten" > copy2 || framework_failure +"${LZIP}" -dfk copy2.lz || fail=1 +cmp in2 copy2 || fail=1 printf . echo -- cgit v1.2.3