summaryrefslogtreecommitdiffstats
path: root/testsuite/check.sh
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/check.sh')
-rwxr-xr-xtestsuite/check.sh22
1 files changed, 14 insertions, 8 deletions
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