summaryrefslogtreecommitdiffstats
path: root/testsuite/check.sh
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 06:48:08 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 06:48:08 +0000
commit64ef9f32de3071e6409480fc5fb4da18978e4f90 (patch)
treed236970f53a8fa5ac1bcfd41d4b687c2d1f3f20b /testsuite/check.sh
parentAdding debian version 0.5-2. (diff)
downloadlzd-64ef9f32de3071e6409480fc5fb4da18978e4f90.tar.xz
lzd-64ef9f32de3071e6409480fc5fb4da18978e4f90.zip
Merging upstream version 0.6.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'testsuite/check.sh')
-rwxr-xr-xtestsuite/check.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/testsuite/check.sh b/testsuite/check.sh
index 5eaa679..0cdc668 100755
--- a/testsuite/check.sh
+++ b/testsuite/check.sh
@@ -1,6 +1,6 @@
#! /bin/sh
# check script for Lzd - Educational decompressor for lzip files
-# Copyright (C) 2013 Antonio Diaz Diaz.
+# Copyright (C) 2013, 2014 Antonio Diaz Diaz.
#
# This script is free software: you have unlimited permission
# to copy, distribute and modify it.
@@ -12,7 +12,7 @@ testdir=`cd "$1" ; pwd`
LZIP="${objdir}"/lzd
framework_failure() { echo "failure in testing framework" ; exit 1 ; }
-if [ ! -x "${LZIP}" ] ; then
+if [ ! -f "${LZIP}" ] || [ ! -x "${LZIP}" ] ; then
echo "${LZIP}: cannot execute"
exit 1
fi
@@ -28,10 +28,10 @@ fail=0
printf "testing lzd-%s..." "$2"
"${LZIP}" < "${in}" 2> /dev/null
-if [ $? = 2 ] ; then printf . ; else fail=1 ; printf - ; fi
+if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi
dd if="${in_lz}" bs=1 count=6 2> /dev/null | "${LZIP}" 2> /dev/null
if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi
-dd if="${in_lz}" bs=1 count=20 2> /dev/null | "${LZIP}" 2> /dev/null
+dd if="${in_lz}" bs=1 count=20 2> /dev/null | "${LZIP}" > /dev/null 2>&1
if [ $? = 2 ] ; then printf . ; else printf - ; fail=1 ; fi
"${LZIP}" < "${in_lz}" > copy || fail=1