1
0
Fork 0

Merging upstream version 0.7.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-24 04:58:43 +01:00
parent 7346c77169
commit 7799d0c878
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
17 changed files with 318 additions and 96 deletions

View file

@ -15,10 +15,12 @@ ZDIFF="${objdir}"/zdiff
ZGREP="${objdir}"/zgrep
ZEGREP="${objdir}"/zegrep
ZFGREP="${objdir}"/zfgrep
ZTEST="${objdir}"/ztest
ZUTILS="${objdir}"/zutils
compressors="gzip bzip2 lzip"
compressors="bzip2 gzip lzip"
extensions="gz bz2 lz"
framework_failure() { echo 'failure in testing framework'; exit 1; }
compressor_needed() { echo "${compressors} are needed to run tests"; exit 1; }
if [ ! -x "${ZCAT}" ] ; then
echo "${ZCAT}: cannot execute"
@ -27,15 +29,14 @@ fi
if [ -d tmp ] ; then rm -rf tmp ; fi
mkdir tmp
echo -n "testing zutils..."
cd "${objdir}"/tmp
for i in ${compressors}; do
cat "${testdir}"/../COPYING > in || framework_failure
$i in || framework_failure
echo -n .
$i in || compressor_needed
done
echo -n "testing zutils..."
cat "${testdir}"/../COPYING > in || framework_failure
cat in > -in- || framework_failure
cat in.lz > -in-.lz || framework_failure
@ -136,16 +137,21 @@ echo -n .
"${ZFGREP}" License in 2>&1 > /dev/null || fail=1
echo -n .
if [ "gzip" != `"${ZUTILS}" -t in.gz` ]; then fail=1 ; fi
"${ZTEST}" in in.gz in.bz2 in.lz -- -in- || fail=1
echo -n .
if [ "bzip2" != `"${ZUTILS}" -t in.bz2` ]; then fail=1 ; fi
"${ZTEST}" -r . || fail=1
echo -n .
if [ "lzip" != `"${ZUTILS}" -t in.lz` ]; then fail=1 ; fi
if [ "bzip2" != `"${ZUTILS}" -t in.bz2` ] ; then fail=1 ; fi
echo -n .
if [ "gzip" != `"${ZUTILS}" -t in.gz` ] ; then fail=1 ; fi
echo -n .
if [ "lzip" != `"${ZUTILS}" -t in.lz` ] ; then fail=1 ; fi
echo -n .
echo
if [ ${fail} = 0 ]; then
if [ ${fail} = 0 ] ; then
echo "tests completed successfully."
cd "${objdir}" && rm -r tmp
else