1
0
Fork 0

Merging upstream version 1.6~pre3.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-20 20:23:05 +01:00
parent b9a866df33
commit 02a8ed6430
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
15 changed files with 306 additions and 185 deletions

View file

@ -14,7 +14,7 @@ BBEXAMPLE="${objdir}"/bbexample
LZCHECK="${objdir}"/lzcheck
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
@ -66,13 +66,13 @@ printf .
"${LZIP}" -cfq "${in_lz}" > out
if [ $? = 1 ] ; then printf . ; else fail=1 ; printf - ; fi
"${LZIP}" -cF "${in_lz}" > out || fail=1
"${LZIP}" -cF -s16 "${in_lz}" > out || fail=1
"${LZIP}" -cd out | "${LZIP}" -d > copy || fail=1
cmp in copy || fail=1
printf .
for i in s4Ki 0 1 2 3 4 5 6 7s16 8s16 9s16 ; do
"${LZIP}" -k -$i in || fail=1
for i in s4Ki 0 1 2 3 4 5 6 7 8 9 ; do
"${LZIP}" -k -$i -s16 in || fail=1
mv -f in.lz copy.lz || fail=1
printf "garbage" >> copy.lz || fail=1
"${LZIP}" -df copy.lz || fail=1
@ -80,35 +80,35 @@ for i in s4Ki 0 1 2 3 4 5 6 7s16 8s16 9s16 ; do
done
printf .
for i in s4Ki 0 1 2 3 4 5 6 7s16 8s16 9s16 ; do
"${LZIP}" -c -$i in > out || fail=1
for i in s4Ki 0 1 2 3 4 5 6 7 8 9 ; do
"${LZIP}" -c -$i -s16 in > out || fail=1
printf "g" >> out || fail=1
"${LZIP}" -cd out > copy || fail=1
cmp in copy || fail=1
done
printf .
for i in s4Ki 0 1 2 3 4 5 6 7s16 8s16 9s16 ; do
"${LZIP}" -$i < in > out || fail=1
for i in s4Ki 0 1 2 3 4 5 6 7 8 9 ; do
"${LZIP}" -$i -s16 < in > out || fail=1
"${LZIP}" -d < out > copy || fail=1
cmp in copy || fail=1
done
printf .
for i in s4Ki 0 1 2 3 4 5 6 7s16 8s16 9s16 ; do
"${LZIP}" -f -$i -o out < in || fail=1
for i in s4Ki 0 1 2 3 4 5 6 7 8 9 ; do
"${LZIP}" -f -$i -s16 -o out < in || fail=1
"${LZIP}" -df -o copy < out.lz || fail=1
cmp in copy || fail=1
done
printf .
"${LZIP}" < in > anyothername || fail=1
"${LZIP}" -s16 < in > anyothername || fail=1
"${LZIP}" -d anyothername || fail=1
cmp in anyothername.out || fail=1
printf .
cat in in > in2 || framework_failure
"${LZIP}" -o copy2 < in2 || fail=1
"${LZIP}" -s16 -o copy2 < in2 || fail=1
"${LZIP}" -t copy2.lz || fail=1
printf .
"${LZIP}" -cd copy2.lz > copy2 || fail=1