summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 16:12:47 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 16:12:47 +0000
commit4edfc3fca1fdca1e046ad16c42ee0a22ab72bb6f (patch)
tree1dea8ff881747fb84455151329255c6f1020493b /testsuite
parentAdding debian version 0.6-1. (diff)
downloadzutils-4edfc3fca1fdca1e046ad16c42ee0a22ab72bb6f.tar.xz
zutils-4edfc3fca1fdca1e046ad16c42ee0a22ab72bb6f.zip
Merging upstream version 0.7.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-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