summaryrefslogtreecommitdiffstats
path: root/testsuite/check.sh
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 13:40:04 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 13:40:04 +0000
commitdb724c11c1c030ce650bb587aa9e810c26287684 (patch)
treec2aed4f2d4e22187f30d2f0fb436f4158ca20228 /testsuite/check.sh
parentAdding upstream version 0.9. (diff)
downloadlzlib-db724c11c1c030ce650bb587aa9e810c26287684.tar.xz
lzlib-db724c11c1c030ce650bb587aa9e810c26287684.zip
Adding upstream version 1.0.upstream/1.0
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'testsuite/check.sh')
-rwxr-xr-xtestsuite/check.sh29
1 files changed, 15 insertions, 14 deletions
diff --git a/testsuite/check.sh b/testsuite/check.sh
index e35876d..69060bd 100755
--- a/testsuite/check.sh
+++ b/testsuite/check.sh
@@ -11,7 +11,7 @@ objdir=`pwd`
testdir=`cd "$1" ; pwd`
LZIP="${objdir}"/minilzip
LZCHECK="${objdir}"/lzcheck
-framework_failure() { echo 'failure in testing framework'; exit 1; }
+framework_failure() { echo "failure in testing framework" ; exit 1 ; }
if [ ! -x "${LZIP}" ] ; then
echo "${LZIP}: cannot execute"
@@ -20,48 +20,49 @@ fi
if [ -d tmp ] ; then rm -rf tmp ; fi
mkdir tmp
-echo -n "testing lzlib..."
+printf "testing lzlib..."
cd "${objdir}"/tmp
cat "${testdir}"/test1 > in || framework_failure
fail=0
+"${LZIP}" -t "${testdir}"/test1.lz || fail=1
"${LZIP}" -cd "${testdir}"/test1.lz > copy || fail=1
cmp in copy || fail=1
-for i in s4096 1 2 3 4 5 6 7 8; do
+for i in s4Ki 0 1 2 3 4 5 6 7 8 9s16 ; do
"${LZIP}" -k -$i in || fail=1
mv -f in.lz copy.lz || fail=1
- echo -n "garbage" >> copy.lz || fail=1
+ printf "garbage" >> copy.lz || fail=1
"${LZIP}" -df copy.lz || fail=1
cmp in copy || fail=1
- echo -n .
+ printf .
done
-for i in s4096 1 2 3 4 5 6 7 8; do
+for i in s4Ki 0 1 2 3 4 5 6 7 8 9s16 ; do
"${LZIP}" -c -$i in > out || fail=1
- echo -n "g" >> out || fail=1
+ printf "g" >> out || fail=1
"${LZIP}" -cd out > copy || fail=1
cmp in copy || fail=1
- echo -n .
+ printf .
done
-for i in s4096 1 2 3 4 5 6 7 8; do
+for i in s4Ki 0 1 2 3 4 5 6 7 8 9s16 ; do
"${LZIP}" -$i < in > out || fail=1
"${LZIP}" -d < out > copy || fail=1
cmp in copy || fail=1
- echo -n .
+ printf .
done
-for i in s4096 1 2 3 4 5 6 7 8; do
- "${LZIP}" -f -$i -o out < in || fail=1
+for i in s4Ki 0 1 2 3 4 5 6 7 8 9s16 ; do
+ "${LZIP}" -fe -$i -o out < in || fail=1
"${LZIP}" -df -o copy < out.lz || fail=1
cmp in copy || fail=1
- echo -n .
+ printf .
done
"${LZCHECK}" in 2>/dev/null || fail=1
-echo -n .
+printf .
echo
if [ ${fail} = 0 ] ; then