diff options
Diffstat (limited to 'testsuite/check.sh')
-rwxr-xr-x | testsuite/check.sh | 8 |
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 |