diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-02-24 20:21:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2019-02-24 20:21:12 +0000 |
commit | 1d0f658132f3be0c133ecd8bec347ad426244f40 (patch) | |
tree | 565d4821fbbc10694ad552fdb77e270d8eeb2a1e /testsuite/check.sh | |
parent | Releasing debian version 0.11-1. (diff) | |
download | tarlz-1d0f658132f3be0c133ecd8bec347ad426244f40.tar.xz tarlz-1d0f658132f3be0c133ecd8bec347ad426244f40.zip |
Merging upstream version 0.12.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testsuite/check.sh')
-rwxr-xr-x | testsuite/check.sh | 48 |
1 files changed, 34 insertions, 14 deletions
diff --git a/testsuite/check.sh b/testsuite/check.sh index 9899c15..f8b65c3 100755 --- a/testsuite/check.sh +++ b/testsuite/check.sh @@ -92,6 +92,7 @@ lzlib_1_11() { [ ${lwarn} = 0 ] && # tlz_in_tar1.tar: 1 member (test3.tar.lz) first magic damaged # tlz_in_tar2.tar: 2 members (foo test3.tar.lz) first magic damaged # ug32chars.tar.lz: 1 member (foo) with 32-character owner and group names +# ug32767.tar.lz: 1 member (foo) with numerical-only owner and group printf "testing tarlz-%s..." "$2" @@ -270,16 +271,16 @@ for i in "${tarint1_lz}" "${tarint2_lz}" ; do "${TARLZ}" -tvf "$i" --threads=$j > outv$j || test_failed $LINENO "$i $j" done - cmp out0 out2 || test_failed $LINENO - cmp out0 out6 || test_failed $LINENO - cmp out2 out6 || test_failed $LINENO - cmp outv0 outv2 || test_failed $LINENO - cmp outv0 outv6 || test_failed $LINENO - cmp outv2 outv6 || test_failed $LINENO + diff -u out0 out2 || test_failed $LINENO $i + diff -u out0 out6 || test_failed $LINENO $i + diff -u out2 out6 || test_failed $LINENO $i + diff -u outv0 outv2 || test_failed $LINENO $i + diff -u outv0 outv6 || test_failed $LINENO $i + diff -u outv2 outv6 || test_failed $LINENO $i rm -f out0 out2 out6 outv0 outv2 outv6 || framework_failure - "${TARLZ}" -xf "$i" || test_failed $LINENO - cmp "${in_tar}" test.txt.tar || test_failed $LINENO - cmp "${test3}" test3.tar || test_failed $LINENO + "${TARLZ}" -xf "$i" || test_failed $LINENO $i + cmp "${in_tar}" test.txt.tar || test_failed $LINENO $i + cmp "${test3}" test3.tar || test_failed $LINENO $i rm -f test.txt.tar test3.tar || framework_failure done @@ -421,10 +422,11 @@ cmp out.tar.lz aout.tar.lz || test_failed $LINENO rm -f out.tar.lz aout.tar.lz || framework_failure # append to solid archive -"${TARLZ}" --solid -0 -cf out.tar.lz foo || test_failed $LINENO +"${TARLZ}" --solid -q -0 -cf out.tar.lz "${in}" foo bar || test_failed $LINENO +"${TARLZ}" -q -tf out.tar.lz || test_failed $LINENO # compressed seekable cat out.tar.lz > aout.tar.lz || framework_failure for i in --asolid --bsolid --dsolid --solid -0 ; do - "${TARLZ}" $i -q -rf out.tar.lz bar baz + "${TARLZ}" $i -q -rf out.tar.lz baz [ $? = 2 ] || test_failed $LINENO $i cmp out.tar.lz aout.tar.lz || test_failed $LINENO $i done @@ -445,6 +447,19 @@ for i in --asolid --bsolid --dsolid -0 ; do done rm -f foo bar baz || framework_failure +# test --diff +"${TARLZ}" -xf "${test3_lz}" || test_failed $LINENO +"${TARLZ}" --uncompressed -cf out.tar foo || test_failed $LINENO +"${TARLZ}" --uncompressed -cf aout.tar foo --anonymous || test_failed $LINENO +if cmp out.tar aout.tar > /dev/null ; then + printf "\nwarning: --diff test can't be run as root." +else + "${TARLZ}" -q -df "${test3_lz}" + [ $? = 1 ] || test_failed $LINENO + "${TARLZ}" -df "${test3_lz}" --ignore-ids || test_failed $LINENO +fi +rm -f out.tar aout.tar foo bar baz || framework_failure + # test directories and links mkdir dir1 || framework_failure "${TARLZ}" -0 -cf out.tar.lz dir1 || test_failed $LINENO @@ -494,7 +509,7 @@ if ln dummy_file dummy_link 2> /dev/null && cmp "${in}" dir1/dir2/dir3/in || test_failed $LINENO cmp "${in}" dir1/dir2/dir3/link || test_failed $LINENO "${TARLZ}" -0 -q -c ../tmp/dir1 | "${TARLZ}" -x || test_failed $LINENO - diff -r tmp/dir1 dir1 || test_failed $LINENO + diff -ru tmp/dir1 dir1 || test_failed $LINENO rm -rf tmp/dir1 dir1 || framework_failure else printf "\nwarning: skipping link test: 'ln' does not work on your system." @@ -510,11 +525,11 @@ if [ "${ln_works}" = yes ] ; then "${TARLZ}" -C dir1 -xf "${t155}" || test_failed $LINENO mkdir dir2 || framework_failure "${TARLZ}" -C dir2 -xf "${t155_lz}" || test_failed $LINENO - diff -r dir1 dir2 || test_failed $LINENO + diff -ru dir1 dir2 || test_failed $LINENO "${TARLZ}" -cf out.tar.lz dir2 || test_failed $LINENO rm -rf dir2 || framework_failure "${TARLZ}" -xf out.tar.lz || test_failed $LINENO - diff -r dir1 dir2 || test_failed $LINENO + diff -ru dir1 dir2 || test_failed $LINENO rmdir dir2 2> /dev/null && test_failed $LINENO rmdir dir1 2> /dev/null && test_failed $LINENO rm -rf out.tar.lz dir2 dir1 || framework_failure @@ -532,6 +547,11 @@ fi "${TARLZ}" -xf "${testdir}"/ug32chars.tar.lz || test_failed $LINENO cmp cfoo foo || test_failed $LINENO rm -f foo || framework_failure +"${TARLZ}" -tvf "${testdir}"/ug32767.tar.lz | grep -q -e 32767/32767 || + test_failed $LINENO +"${TARLZ}" -xf "${testdir}"/ug32767.tar.lz || test_failed $LINENO +cmp cfoo foo || test_failed $LINENO +rm -f foo || framework_failure printf "\ntesting bad input..." |