From b1a0f85fe3a832e8b91ef367399cd76632d633f4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 7 Nov 2015 17:12:41 +0100 Subject: Adding upstream version 0.7. Signed-off-by: Daniel Baumann --- testsuite/check.sh | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'testsuite') diff --git a/testsuite/check.sh b/testsuite/check.sh index 41e44b7..1c8b249 100755 --- a/testsuite/check.sh +++ b/testsuite/check.sh @@ -15,10 +15,12 @@ ZDIFF="${objdir}"/zdiff ZGREP="${objdir}"/zgrep ZEGREP="${objdir}"/zegrep ZFGREP="${objdir}"/zfgrep +ZTEST="${objdir}"/ztest ZUTILS="${objdir}"/zutils -compressors="gzip bzip2 lzip" +compressors="bzip2 gzip lzip" extensions="gz bz2 lz" framework_failure() { echo 'failure in testing framework'; exit 1; } +compressor_needed() { echo "${compressors} are needed to run tests"; exit 1; } if [ ! -x "${ZCAT}" ] ; then echo "${ZCAT}: cannot execute" @@ -27,15 +29,14 @@ fi if [ -d tmp ] ; then rm -rf tmp ; fi mkdir tmp -echo -n "testing zutils..." cd "${objdir}"/tmp for i in ${compressors}; do cat "${testdir}"/../COPYING > in || framework_failure - $i in || framework_failure - echo -n . + $i in || compressor_needed done +echo -n "testing zutils..." cat "${testdir}"/../COPYING > in || framework_failure cat in > -in- || framework_failure cat in.lz > -in-.lz || framework_failure @@ -136,16 +137,21 @@ echo -n . "${ZFGREP}" License in 2>&1 > /dev/null || fail=1 echo -n . -if [ "gzip" != `"${ZUTILS}" -t in.gz` ]; then fail=1 ; fi +"${ZTEST}" in in.gz in.bz2 in.lz -- -in- || fail=1 +echo -n . +"${ZTEST}" -r . || fail=1 +echo -n . + +if [ "bzip2" != `"${ZUTILS}" -t in.bz2` ] ; then fail=1 ; fi echo -n . -if [ "bzip2" != `"${ZUTILS}" -t in.bz2` ]; then fail=1 ; fi +if [ "gzip" != `"${ZUTILS}" -t in.gz` ] ; then fail=1 ; fi echo -n . -if [ "lzip" != `"${ZUTILS}" -t in.lz` ]; then fail=1 ; fi +if [ "lzip" != `"${ZUTILS}" -t in.lz` ] ; then fail=1 ; fi echo -n . echo -if [ ${fail} = 0 ]; then +if [ ${fail} = 0 ] ; then echo "tests completed successfully." cd "${objdir}" && rm -r tmp else -- cgit v1.2.3