Merging upstream version 1.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
ceb851d071
commit
7a0d5b3be5
23 changed files with 710 additions and 380 deletions
|
@ -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 .
|
||||
|
||||
for i in s4Ki 0 1 2 3 4 5 6 7 8 9s16 ; do
|
||||
"${LZIP}" -t "${testdir}"/test_v1.lz || fail=1
|
||||
printf .
|
||||
"${LZIP}" -cd "${testdir}"/test_v1.lz > copy || fail=1
|
||||
cmp in copy || fail=1
|
||||
printf .
|
||||
|
||||
"${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
|
||||
|
|
BIN
testsuite/test_sync.lz
Normal file
BIN
testsuite/test_sync.lz
Normal file
Binary file not shown.
BIN
testsuite/test_v1.lz
Normal file
BIN
testsuite/test_v1.lz
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue