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