diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-12-09 04:37:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-12-09 04:37:44 +0000 |
commit | 4816449fbba7a5716f22aa5c1e9fa6bc62059fae (patch) | |
tree | d4d76c634fa506b06bb16314c2339bd066e679ad /testsuite | |
parent | Adding upstream version 1.13. (diff) | |
download | zutils-4816449fbba7a5716f22aa5c1e9fa6bc62059fae.tar.xz zutils-4816449fbba7a5716f22aa5c1e9fa6bc62059fae.zip |
Adding upstream version 1.14~rc1.upstream/1.14_rc1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/check.sh | 94 | ||||
-rw-r--r-- | testsuite/test.txt | 6 | ||||
-rw-r--r-- | testsuite/test.txt.tar | bin | 40960 -> 37888 bytes | |||
-rw-r--r-- | testsuite/test_bad_crc.lz | bin | 7376 -> 7341 bytes |
4 files changed, 49 insertions, 51 deletions
diff --git a/testsuite/check.sh b/testsuite/check.sh index 730dfa6..76e617f 100755 --- a/testsuite/check.sh +++ b/testsuite/check.sh @@ -39,7 +39,7 @@ mkdir tmp cd "${objdir}"/tmp || framework_failure for i in ${compressors}; do - cat "${testdir}"/test.txt > in || framework_failure + cp "${testdir}"/test.txt in || framework_failure $i in || compressor_needed printf "Hello World!\n" > hello || framework_failure $i hello || compressor_needed @@ -47,13 +47,13 @@ for i in ${compressors}; do $i zero || compressor_needed done -cat "${testdir}"/test.txt > in || framework_failure -cat "${testdir}"/test.txt.tar > in.tar || framework_failure +cp "${testdir}"/test.txt in || framework_failure +cp "${testdir}"/test.txt.tar in.tar || framework_failure printf "01234567890" > pin.tar4 || framework_failure cat in.tar in.tar in.tar in.tar >> pin.tar4 || framework_failure -cat in > -in- || framework_failure -cat in.lz > -in-.lz || framework_failure -cat in.lz > lz_only.lz || framework_failure +cp in -- -in- || framework_failure +cp in.lz -- -in-.lz || framework_failure +cp in.lz lz_only.lz || framework_failure cat in in in in in in > in6 || framework_failure bad0_lz="${testdir}"/zero_bad_crc.lz bad0_gz="${testdir}"/zero_bad_crc.gz @@ -94,9 +94,9 @@ printf "LZIP\001-.............................." | "${ZCAT}" -N > /dev/null 2>&1 printf "LZIPxxxxxx" | "${ZCAT}" -N > /dev/null || test_failed $LINENO printf "BZh9xxxxxx" | "${ZCAT}" -N > /dev/null || test_failed $LINENO "${ZCAT}" -N -v -s "${testdir}"/zcat_vs.dat > /dev/null || test_failed $LINENO -"${ZCAT}" -N < in > out || test_failed $LINENO +"${ZCAT}" -N -c < in > out || test_failed $LINENO cmp in out || test_failed $LINENO -"${ZCAT}" -N < in.gz > out || test_failed $LINENO +"${ZCAT}" -N -d < in.gz > out || test_failed $LINENO cmp in out || test_failed $LINENO "${ZCAT}" -N < in.bz2 > out || test_failed $LINENO cmp in out || test_failed $LINENO @@ -227,8 +227,8 @@ cat in.lz | "${ZCMP}" -N -O un,un in.lz - || test_failed $LINENO [ $? = 2 ] || test_failed $LINENO "${ZCMP}" -N --bad-option in in 2> /dev/null [ $? = 2 ] || test_failed $LINENO -cat in.gz > a.gz || framework_failure -cat in.lz > a.lz || framework_failure +cp in.gz a.gz || framework_failure +cp in.lz a.lz || framework_failure "${ZCMP}" -N a.gz || test_failed $LINENO "${ZCMP}" -N a.lz || test_failed $LINENO @@ -294,8 +294,8 @@ cat in.gz | "${ZDIFF}" -N -O un,un - in.gz || test_failed $LINENO [ $? = 2 ] || test_failed $LINENO mkdir tmp2 -cat in > tmp2/a || framework_failure -cat in.lz > tmp2/a.lz || framework_failure +cp in tmp2/a || framework_failure +cp in.lz tmp2/a.lz || framework_failure "${ZDIFF}" -N --format=bz2 tmp2/a 2> /dev/null [ $? = 2 ] || test_failed $LINENO "${ZDIFF}" -N --format=gz tmp2/a 2> /dev/null @@ -405,10 +405,10 @@ rm -f empty.bz2 empty.gz empty.lz || framework_failure "${ZTEST}" -N empty || test_failed $LINENO # test wrong compressed extensions -cat in.bz2 > in_bz2.gz || framework_failure -cat in.gz > in_gz.lz || framework_failure -cat in.lz > in_lz.bz2 || framework_failure -cat in > in_un.lz || framework_failure +cp in.bz2 in_bz2.gz || framework_failure +cp in.gz in_gz.lz || framework_failure +cp in.lz in_lz.bz2 || framework_failure +cp in in_un.lz || framework_failure "${ZTEST}" -Nq in_bz2.gz [ $? = 2 ] || test_failed $LINENO "${ZTEST}" -Nq in_gz.lz @@ -446,8 +446,8 @@ dd if=in.lz bs=1000 count=1 2> /dev/null | "${ZTEST}" -N -q printf "\ntesting zupdate-%s..." "$2" "${ZUPDATE}" -N "" || test_failed $LINENO -cat in.bz2 > a.bz2 || framework_failure -cat in.gz > a.gz || framework_failure +cp in.bz2 a.bz2 || framework_failure +cp in.gz a.gz || framework_failure "${ZUPDATE}" -Nq --bz2=bad_command a.bz2 [ $? = 1 ] || test_failed $LINENO "${ZUPDATE}" -N --bz2='bzip2 --bad-option' a.bz2 > /dev/null 2>&1 @@ -492,8 +492,8 @@ rm -f a.lz || framework_failure [ -e a.lz ] || test_failed $LINENO rm -f a.lz || framework_failure -cat in.bz2 > a.bz2 || framework_failure -cat in.gz > a.gz || framework_failure +cp in.bz2 a.bz2 || framework_failure +cp in.gz a.gz || framework_failure "${ZUPDATE}" -N -q -0 a.bz2 a.gz [ $? = 1 ] || test_failed $LINENO [ ! -e a.bz2 ] || test_failed $LINENO @@ -501,16 +501,16 @@ cat in.gz > a.gz || framework_failure [ -e a.lz ] || test_failed $LINENO rm -f a.lz || framework_failure -cat in.bz2 > a.bz2 || framework_failure -cat in.gz > a.gz || framework_failure +cp in.bz2 a.bz2 || framework_failure +cp in.gz a.gz || framework_failure "${ZUPDATE}" -N -0 -f -k a.bz2 a.gz || test_failed $LINENO [ -e a.bz2 ] || test_failed $LINENO [ -e a.gz ] || test_failed $LINENO [ -e a.lz ] || test_failed $LINENO rm -f a.lz || framework_failure -cat in.bz2 > a.bz2 || framework_failure -cat in.gz > a.gz || framework_failure +cp in.bz2 a.bz2 || framework_failure +cp in.gz a.gz || framework_failure "${ZUPDATE}" -N -0 -f a.bz2 a.gz || test_failed $LINENO [ ! -e a.bz2 ] || test_failed $LINENO [ ! -e a.gz ] || test_failed $LINENO @@ -518,9 +518,9 @@ cat in.gz > a.gz || framework_failure [ -e a.lz ] || test_failed $LINENO rm -f a.lz || framework_failure -cat in.bz2 > a.tbz || framework_failure # keep combined extensions -cat in.bz2 > b.tbz2 || framework_failure -cat in.gz > c.tgz || framework_failure +cp in.bz2 a.tbz || framework_failure # keep combined extensions +cp in.bz2 b.tbz2 || framework_failure +cp in.gz c.tgz || framework_failure "${ZUPDATE}" -N -0 a.tbz b.tbz2 c.tgz || test_failed $LINENO [ ! -e a.tbz ] || test_failed $LINENO [ ! -e b.tbz2 ] || test_failed $LINENO @@ -536,9 +536,9 @@ cat in.gz > c.tgz || framework_failure [ -e c.tlz ] || test_failed $LINENO rm -f a.tlz b.tlz c.tlz || framework_failure -cat in.bz2 > a.tbz || framework_failure # expand combined extensions -cat in.bz2 > b.tbz2 || framework_failure -cat in.gz > c.tgz || framework_failure +cp in.bz2 a.tbz || framework_failure # expand combined extensions +cp in.bz2 b.tbz2 || framework_failure +cp in.gz c.tgz || framework_failure "${ZUPDATE}" -N -0 -e a.tbz b.tbz2 c.tgz || test_failed $LINENO [ ! -e a.tbz ] || test_failed $LINENO [ ! -e b.tbz2 ] || test_failed $LINENO @@ -555,9 +555,9 @@ cat in.gz > c.tgz || framework_failure rm -f a.tar.lz b.tar.lz c.tar.lz || framework_failure # test decompression error -cat in.bz2 > a.bz2 || framework_failure -cat "${bad0_gz}" > b.gz || framework_failure -cat in.gz > c.gz || framework_failure +cp in.bz2 a.bz2 || framework_failure +cp "${bad0_gz}" b.gz || framework_failure +cp in.gz c.gz || framework_failure "${ZUPDATE}" -N -0 -f a.bz2 b.gz c.gz 2> /dev/null [ $? = 1 ] || test_failed $LINENO [ ! -e a.bz2 ] || test_failed $LINENO @@ -568,9 +568,9 @@ cat in.gz > c.gz || framework_failure [ ! -e c ] || test_failed $LINENO [ -e a.lz ] || test_failed $LINENO # ignore error -cat in.bz2 > a.bz2 || framework_failure -cat "${bad0_gz}" > b.gz || framework_failure -cat in.gz > c.gz || framework_failure +cp in.bz2 a.bz2 || framework_failure +cp "${bad0_gz}" b.gz || framework_failure +cp in.gz c.gz || framework_failure "${ZUPDATE}" -N -0 -f -i a.bz2 b.gz c.gz 2> /dev/null [ $? = 1 ] || test_failed $LINENO [ ! -e a.bz2 ] || test_failed $LINENO @@ -579,20 +579,20 @@ cat in.gz > c.gz || framework_failure [ -e a.lz ] || test_failed $LINENO rm -f a.lz b.gz c.gz || framework_failure -cat in.bz2 > a.bz2 || framework_failure +cp in.bz2 a.bz2 || framework_failure "${ZUPDATE}" -N -0 -q a.bz2 || test_failed $LINENO [ ! -e a.bz2 ] || test_failed $LINENO [ -e a.lz ] || test_failed $LINENO rm -f a.lz || framework_failure -cat in.gz > 'name with spaces.gz' || framework_failure +cp in.gz 'name with spaces.gz' || framework_failure "${ZUPDATE}" -N -0 -q 'name with spaces.gz' || test_failed $LINENO [ ! -e 'name with spaces.gz' ] || test_failed $LINENO [ -e 'name with spaces.lz' ] || test_failed $LINENO "${ZCMP}" -N in 'name with spaces.lz' || test_failed $LINENO rm -f 'name with spaces.lz' || framework_failure -cat zero.gz > z.gz || framework_failure +cp zero.gz z.gz || framework_failure "${ZUPDATE}" -N -0 -q z.gz || test_failed $LINENO [ ! -e z.gz ] || test_failed $LINENO [ -e z.lz ] || test_failed $LINENO @@ -601,14 +601,14 @@ rm -f empty z.lz || framework_failure mkdir tmp2 mkdir tmp2/tmp3 -cat in.bz2 > tmp2/tmp3/a.bz2 || framework_failure -cat in.gz > tmp2/tmp3/a.gz || framework_failure +cp in.bz2 tmp2/tmp3/a.bz2 || framework_failure +cp in.gz tmp2/tmp3/a.gz || framework_failure # test recursive to destdir "${ZUPDATE}" -N -0 -k -r --format=gz --destdir=ddir1 tmp2 || test_failed $LINENO [ -e tmp2/tmp3/a.bz2 ] || test_failed $LINENO [ -e tmp2/tmp3/a.gz ] || test_failed $LINENO -[ -e ddir1/tmp3/a.lz ] || test_failed $LINENO -"${ZUPDATE}" -N -0 -k -r --format=bz2 --destdir="${objdir}"/tmp/ddir2 tmp2 || +[ -e ddir1/tmp2/tmp3/a.lz ] || test_failed $LINENO +"${ZUPDATE}" -N -0 -k -r --format=bz2 --destdir="${objdir}"/tmp/ddir2 tmp2/ || test_failed $LINENO [ -e tmp2/tmp3/a.bz2 ] || test_failed $LINENO [ -e tmp2/tmp3/a.gz ] || test_failed $LINENO @@ -618,11 +618,11 @@ cat in.gz > tmp2/tmp3/a.gz || framework_failure [ -e tmp2/tmp3/a.bz2 ] || test_failed $LINENO [ -e tmp2/tmp3/a.gz ] || test_failed $LINENO [ -e ddir3/a.lz ] || test_failed $LINENO -"${ZUPDATE}" -N -0 -k --destdir=ddir4/tmp2/tmp3 tmp2/tmp3/a.gz || +"${ZUPDATE}" -N -0 -k --destdir=ddir4/tmp0/tmp1 tmp2/tmp3/a.gz || test_failed $LINENO [ -e tmp2/tmp3/a.bz2 ] || test_failed $LINENO [ -e tmp2/tmp3/a.gz ] || test_failed $LINENO -[ -e ddir4/tmp2/tmp3/a.lz ] || test_failed $LINENO +[ -e ddir4/tmp0/tmp1/a.lz ] || test_failed $LINENO rm -rf ddir1 ddir2 ddir3 ddir4 || framework_failure # test recursive in place "${ZUPDATE}" -N -0 -r --format=gz tmp2 || test_failed $LINENO @@ -635,8 +635,8 @@ rm -f tmp2/tmp3/a.lz || framework_failure [ ! -e tmp2/tmp3/a.gz ] || test_failed $LINENO [ -e tmp2/tmp3/a.lz ] || test_failed $LINENO rm -f tmp2/tmp3/a.lz || framework_failure -cat in.bz2 > tmp2/tmp3/a.bz2 || framework_failure -cat in.gz > tmp2/tmp3/a.gz || framework_failure +cp in.bz2 tmp2/tmp3/a.bz2 || framework_failure +cp in.gz tmp2/tmp3/a.gz || framework_failure cd tmp2 || framework_failure "${ZUPDATE}" -N -0 -r -k -f . || test_failed $LINENO [ -e tmp3/a.bz2 ] || test_failed $LINENO diff --git a/testsuite/test.txt b/testsuite/test.txt index 9196a3a..423f0c0 100644 --- a/testsuite/test.txt +++ b/testsuite/test.txt @@ -1,8 +1,7 @@ GNU GENERAL PUBLIC LICENSE Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Copyright (C) 1989, 1991 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -339,8 +338,7 @@ Public License instead of this License. GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
diff --git a/testsuite/test.txt.tar b/testsuite/test.txt.tar Binary files differindex 92d6f1b..151ab1e 100644 --- a/testsuite/test.txt.tar +++ b/testsuite/test.txt.tar diff --git a/testsuite/test_bad_crc.lz b/testsuite/test_bad_crc.lz Binary files differindex c7d5bc9..d952c77 100644 --- a/testsuite/test_bad_crc.lz +++ b/testsuite/test_bad_crc.lz |