Adding upstream version 0.25.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
4f5d0de2b2
commit
8853aa3bf2
33 changed files with 317 additions and 280 deletions
|
@ -1,14 +1,14 @@
|
|||
#! /bin/sh
|
||||
# check script for Tarlz - Archiver with multimember lzip compression
|
||||
# Copyright (C) 2013-2023 Antonio Diaz Diaz.
|
||||
# Copyright (C) 2013-2024 Antonio Diaz Diaz.
|
||||
#
|
||||
# This script is free software: you have unlimited permission
|
||||
# to copy, distribute, and modify it.
|
||||
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
objdir="`pwd`"
|
||||
testdir="`cd "$1" ; pwd`"
|
||||
objdir=`pwd`
|
||||
testdir=`cd "$1" ; pwd`
|
||||
TARLZ="${objdir}"/tarlz
|
||||
framework_failure() { echo "failure in testing framework" ; exit 1 ; }
|
||||
|
||||
|
@ -154,13 +154,13 @@ printf "testing tarlz-%s..." "$2"
|
|||
[ $? = 1 ] || test_failed $LINENO
|
||||
"${TARLZ}" -q -x -C nx_dir "${test3_lz}"
|
||||
[ $? = 1 ] || test_failed $LINENO
|
||||
touch empty.tar.lz empty.tlz # list an empty lz file
|
||||
touch empty.tar.lz empty.tlz || framework_failure # list an empty lz file
|
||||
"${TARLZ}" -q -tf empty.tar.lz
|
||||
[ $? = 2 ] || test_failed $LINENO
|
||||
"${TARLZ}" -q -tf empty.tlz
|
||||
[ $? = 2 ] || test_failed $LINENO
|
||||
rm -f empty.tar.lz empty.tlz || framework_failure
|
||||
touch empty.tar # compress an empty archive
|
||||
touch empty.tar || framework_failure # compress an empty archive
|
||||
"${TARLZ}" -q -z empty.tar
|
||||
[ $? = 2 ] || test_failed $LINENO
|
||||
[ ! -e empty.tar.lz ] || test_failed $LINENO
|
||||
|
@ -245,6 +245,7 @@ rm -f foo bar baz || framework_failure
|
|||
cmp cfoo foo || test_failed $LINENO
|
||||
cmp cbar bar || test_failed $LINENO
|
||||
cmp cbaz baz || test_failed $LINENO
|
||||
# time and mode comparison always fails on OS/2
|
||||
if "${TARLZ}" -df "${test3}" --ignore-ids ; then d_works=yes
|
||||
else printf "warning: some '--diff' tests will be skipped.\n"
|
||||
fi
|
||||
|
@ -290,10 +291,12 @@ for i in "${test3}" "${test3_lz}" ; do
|
|||
cmp cfoo dir1/foo || test_failed $LINENO "$i"
|
||||
cmp cbar dir2/bar || test_failed $LINENO "$i"
|
||||
cmp cbaz dir3/baz || test_failed $LINENO "$i"
|
||||
"${TARLZ}" -q -df "$i" -C dir1 foo -C ../dir2 --ignore-ids bar \
|
||||
-C ../dir3 baz || test_failed $LINENO "$i"
|
||||
"${TARLZ}" -q -df "$i" -C dir3 baz -C ../dir2 bar -C ../dir1 foo \
|
||||
--ignore-ids || test_failed $LINENO "$i"
|
||||
if [ "${d_works}" = yes ] ; then
|
||||
"${TARLZ}" -df "$i" -C dir1 foo -C ../dir2 --ignore-ids bar \
|
||||
-C ../dir3 baz || test_failed $LINENO "$i"
|
||||
"${TARLZ}" -df "$i" -C dir3 baz -C ../dir2 bar -C ../dir1 foo \
|
||||
--ignore-ids || test_failed $LINENO "$i"
|
||||
fi
|
||||
rm -rf dir1 dir2 dir3 || framework_failure
|
||||
done
|
||||
for i in "${test3dir}" "${test3dir_lz}" ; do
|
||||
|
@ -303,10 +306,12 @@ for i in "${test3dir}" "${test3dir_lz}" ; do
|
|||
cmp cfoo dir1/dir/foo || test_failed $LINENO "$i"
|
||||
cmp cbar dir2/dir/bar || test_failed $LINENO "$i"
|
||||
cmp cbaz dir3/dir/baz || test_failed $LINENO "$i"
|
||||
"${TARLZ}" -q -df "$i" --ignore-ids -C dir1 dir/foo -C ../dir2 dir/bar \
|
||||
-C ../dir3 dir/baz || test_failed $LINENO "$i"
|
||||
"${TARLZ}" -q -df "${test3}" -C dir1/dir foo -C ../../dir2/dir bar \
|
||||
--ignore-ids -C ../../dir3/dir baz || test_failed $LINENO "$i"
|
||||
if [ "${d_works}" = yes ] ; then
|
||||
"${TARLZ}" -q -df "$i" --ignore-ids -C dir1 dir/foo -C ../dir2 dir/bar \
|
||||
-C ../dir3 dir/baz || test_failed $LINENO "$i"
|
||||
"${TARLZ}" -q -df "${test3}" -C dir1/dir foo -C ../../dir2/dir bar \
|
||||
--ignore-ids -C ../../dir3/dir baz || test_failed $LINENO "$i"
|
||||
fi
|
||||
rm -rf dir1 dir2 dir3 || framework_failure
|
||||
done
|
||||
|
||||
|
@ -768,7 +773,6 @@ rm -rf out.tar dir || framework_failure
|
|||
|
||||
printf "\ntesting --diff..."
|
||||
|
||||
# test --diff
|
||||
"${TARLZ}" -xf "${test3_lz}" || test_failed $LINENO
|
||||
"${TARLZ}" -cf out.tar foo || test_failed $LINENO
|
||||
"${TARLZ}" -cf aout.tar foo --anonymous || test_failed $LINENO
|
||||
|
@ -787,6 +791,8 @@ else
|
|||
rm -f bar || framework_failure
|
||||
"${TARLZ}" -n$i -df "${test3_lz}" --ignore-ids foo baz ||
|
||||
test_failed $LINENO $i
|
||||
"${TARLZ}" -n$i -df "${test3_lz}" --ignore-metadata foo baz ||
|
||||
test_failed $LINENO $i
|
||||
"${TARLZ}" -n$i -df "${test3_lz}" --exclude bar --ignore-ids ||
|
||||
test_failed $LINENO $i
|
||||
rm -f foo baz || framework_failure
|
||||
|
@ -1199,6 +1205,9 @@ cmp out.tar.lz out || test_failed $LINENO
|
|||
"${TARLZ}" -0 -B8KiB -z --bsolid outz.tar || test_failed $LINENO
|
||||
cmp out.tar.lz outz.tar.lz || test_failed $LINENO
|
||||
rm -f out outz.tar.lz || framework_failure
|
||||
"${TARLZ}" -0 -B8KiB -z -o a/b/c/out --bsolid out.tar || test_failed $LINENO
|
||||
cmp out.tar.lz a/b/c/out || test_failed $LINENO
|
||||
rm -rf a || framework_failure
|
||||
#
|
||||
"${TARLZ}" -0 -n0 --asolid -cf out.tar.lz test.txt foo bar baz test.txt || test_failed $LINENO
|
||||
"${TARLZ}" -0 -n0 --asolid -cf out3.tar.lz foo bar baz || test_failed $LINENO
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue