diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 13:41:03 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-07 13:41:03 +0000 |
commit | be26dc2b4ee2be043b42250cbcda337cedf635d8 (patch) | |
tree | 027e128c510f3b64af2741189c2ab578c7957682 /testsuite | |
parent | Adding upstream version 1.0. (diff) | |
download | lzlib-be26dc2b4ee2be043b42250cbcda337cedf635d8.tar.xz lzlib-be26dc2b4ee2be043b42250cbcda337cedf635d8.zip |
Adding upstream version 1.1.upstream/1.1
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rwxr-xr-x | testsuite/check.sh | 47 | ||||
-rw-r--r-- | testsuite/test.txt (renamed from testsuite/test1) | 0 | ||||
-rw-r--r-- | testsuite/test_sync.lz | bin | 0 -> 11658 bytes | |||
-rw-r--r-- | testsuite/test_v0.lz (renamed from testsuite/test1.lz) | bin | 11540 -> 11540 bytes | |||
-rw-r--r-- | testsuite/test_v1.lz | bin | 0 -> 11548 bytes |
5 files changed, 36 insertions, 11 deletions
diff --git a/testsuite/check.sh b/testsuite/check.sh index 69060bd..be6204b 100755 --- a/testsuite/check.sh +++ b/testsuite/check.sh @@ -1,6 +1,6 @@ #! /bin/sh # check script for Lzlib - A compression library for lzip files -# Copyright (C) 2009, 2010 Antonio Diaz Diaz. +# Copyright (C) 2009, 2010, 2011 Antonio Diaz Diaz. # # This script is free software: you have unlimited permission # to copy, distribute and modify it. @@ -10,6 +10,7 @@ export LC_ALL objdir=`pwd` testdir=`cd "$1" ; pwd` LZIP="${objdir}"/minilzip +BBEXAMPLE="${objdir}"/bbexample LZCHECK="${objdir}"/lzcheck framework_failure() { echo "failure in testing framework" ; exit 1 ; } @@ -20,17 +21,31 @@ fi if [ -d tmp ] ; then rm -rf tmp ; fi mkdir tmp -printf "testing lzlib..." +printf "testing lzlib-%s..." "$2" cd "${objdir}"/tmp -cat "${testdir}"/test1 > in || framework_failure +cat "${testdir}"/test.txt > in || framework_failure fail=0 -"${LZIP}" -t "${testdir}"/test1.lz || fail=1 -"${LZIP}" -cd "${testdir}"/test1.lz > copy || fail=1 +"${LZIP}" -t "${testdir}"/test_v0.lz || fail=1 +printf . +"${LZIP}" -cd "${testdir}"/test_v0.lz > copy || fail=1 +cmp in copy || fail=1 +printf . + +"${LZIP}" -t "${testdir}"/test_v1.lz || fail=1 +printf . +"${LZIP}" -cd "${testdir}"/test_v1.lz > copy || fail=1 cmp in copy || fail=1 +printf . -for i in s4Ki 0 1 2 3 4 5 6 7 8 9s16 ; do +"${LZIP}" -t "${testdir}"/test_sync.lz || fail=1 +printf . +"${LZIP}" -cd "${testdir}"/test_sync.lz > copy || fail=1 +cmp in copy || fail=1 +printf . + +for i in s4Ki 0 1 2 3 4 5 6 7 8s16 9s16 ; do "${LZIP}" -k -$i in || fail=1 mv -f in.lz copy.lz || fail=1 printf "garbage" >> copy.lz || fail=1 @@ -39,7 +54,7 @@ for i in s4Ki 0 1 2 3 4 5 6 7 8 9s16 ; do printf . done -for i in s4Ki 0 1 2 3 4 5 6 7 8 9s16 ; do +for i in s4Ki 0 1 2 3 4 5 6 7 8s16 9s16 ; do "${LZIP}" -c -$i in > out || fail=1 printf "g" >> out || fail=1 "${LZIP}" -cd out > copy || fail=1 @@ -47,21 +62,31 @@ for i in s4Ki 0 1 2 3 4 5 6 7 8 9s16 ; do printf . done -for i in s4Ki 0 1 2 3 4 5 6 7 8 9s16 ; do +for i in s4Ki 0 1 2 3 4 5 6 7 8s16 9s16 ; do "${LZIP}" -$i < in > out || fail=1 "${LZIP}" -d < out > copy || fail=1 cmp in copy || fail=1 printf . done -for i in s4Ki 0 1 2 3 4 5 6 7 8 9s16 ; do - "${LZIP}" -fe -$i -o out < in || fail=1 +for i in s4Ki 0 1 2 3 4 5 6 7 8s16 9s16 ; do + "${LZIP}" -f -$i -o out < in || fail=1 "${LZIP}" -df -o copy < out.lz || fail=1 cmp in copy || fail=1 printf . done -"${LZCHECK}" in 2>/dev/null || fail=1 +"${LZIP}" -$i < in > anyothername || fail=1 +"${LZIP}" -dq anyothername || fail=1 +cmp in anyothername.out || fail=1 +printf . + +"${BBEXAMPLE}" in || fail=1 +printf . +"${BBEXAMPLE}" out || fail=1 +printf . + +"${LZCHECK}" in || fail=1 printf . echo diff --git a/testsuite/test1 b/testsuite/test.txt index 5b244d5..5b244d5 100644 --- a/testsuite/test1 +++ b/testsuite/test.txt diff --git a/testsuite/test_sync.lz b/testsuite/test_sync.lz Binary files differnew file mode 100644 index 0000000..419fa97 --- /dev/null +++ b/testsuite/test_sync.lz diff --git a/testsuite/test1.lz b/testsuite/test_v0.lz Binary files differindex a09b1e8..a09b1e8 100644 --- a/testsuite/test1.lz +++ b/testsuite/test_v0.lz diff --git a/testsuite/test_v1.lz b/testsuite/test_v1.lz Binary files differnew file mode 100644 index 0000000..f1c79eb --- /dev/null +++ b/testsuite/test_v1.lz |