diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-07-26 05:52:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-07-26 05:52:14 +0000 |
commit | 8a67143a2cc2f55f9c3013a8467a84a2dd0c1c14 (patch) | |
tree | c64b3cecf08395f4e1e48ce022a2c69478a8ec6a /testsuite/check.sh | |
parent | Adding upstream version 1.11. (diff) | |
download | zutils-8a67143a2cc2f55f9c3013a8467a84a2dd0c1c14.tar.xz zutils-8a67143a2cc2f55f9c3013a8467a84a2dd0c1c14.zip |
Adding upstream version 1.12~pre2.upstream/1.12_pre2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testsuite/check.sh')
-rwxr-xr-x | testsuite/check.sh | 42 |
1 files changed, 37 insertions, 5 deletions
diff --git a/testsuite/check.sh b/testsuite/check.sh index b97abd7..5ad9d5b 100755 --- a/testsuite/check.sh +++ b/testsuite/check.sh @@ -321,6 +321,8 @@ done test_failed $LINENO "${ZGREP}" -N -l "GNU" in in.gz in.bz2 in.lz -- -in- > /dev/null || test_failed $LINENO +"${ZGREP}" -N -l -Z "GNU" in in.gz in.bz2 in.lz -- -in- > /dev/null || + test_failed $LINENO "${ZGREP}" -N -L "GNU" in in.gz in.bz2 in.lz -- -in- || test_failed $LINENO "${ZGREP}" -N -l "nx_pattern" in in.gz in.bz2 in.lz -- -in- && test_failed $LINENO @@ -402,15 +404,15 @@ cat in.gz > a.gz || framework_failure "${ZUPDATE}" -N --gz='gzip --bad-option' a.gz 2> /dev/null [ $? = 1 ] || test_failed $LINENO "${ZUPDATE}" -Nq --lz=bad_command a.gz -[ $? = 1 ] || test_failed $LINENO +[ $? = 2 ] || test_failed $LINENO "${ZUPDATE}" -N --lz='lzip --bad-option' a.gz 2> /dev/null -[ $? = 1 ] || test_failed $LINENO +[ $? = 2 ] || test_failed $LINENO "${ZUPDATE}" -N --bad-option 2> /dev/null -[ $? = 1 ] || test_failed $LINENO +[ $? = 2 ] || test_failed $LINENO cat in.lz in.lz > a.lz || framework_failure "${ZUPDATE}" -Nq -f a.bz2 a.gz -[ $? = 1 ] || test_failed $LINENO +[ $? = 2 ] || test_failed $LINENO [ -e a.bz2 ] || test_failed $LINENO [ -e a.gz ] || test_failed $LINENO [ -e a.lz ] || test_failed $LINENO @@ -471,10 +473,30 @@ 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 +"${ZUPDATE}" -N -e a.tbz b.tbz2 c.tgz || test_failed $LINENO +[ ! -e a.tbz ] || test_failed $LINENO +[ ! -e b.tbz2 ] || test_failed $LINENO +[ ! -e c.tgz ] || test_failed $LINENO +[ ! -e a ] || test_failed $LINENO +[ ! -e b ] || test_failed $LINENO +[ ! -e c ] || test_failed $LINENO +[ -e a.tar.lz ] || test_failed $LINENO +[ -e b.tar.lz ] || test_failed $LINENO +[ -e c.tar.lz ] || test_failed $LINENO +[ ! -e a.tlz ] || test_failed $LINENO +[ ! -e b.tlz ] || test_failed $LINENO +[ ! -e c.tlz ] || test_failed $LINENO +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 -"${ZUPDATE}" -N -f a.bz2 b.gz c.gz 2> /dev/null && test_failed $LINENO +"${ZUPDATE}" -N -f a.bz2 b.gz c.gz 2> /dev/null +[ $? = 1 ] || test_failed $LINENO [ ! -e a.bz2 ] || test_failed $LINENO [ -e b.gz ] || test_failed $LINENO [ -e c.gz ] || test_failed $LINENO @@ -482,6 +504,16 @@ cat in.gz > c.gz || framework_failure [ ! -e b ] || test_failed $LINENO [ ! -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 +"${ZUPDATE}" -N -f -i a.bz2 b.gz c.gz 2> /dev/null +[ $? = 1 ] || test_failed $LINENO +[ ! -e a.bz2 ] || test_failed $LINENO +[ -e b.gz ] || test_failed $LINENO +[ ! -e c.gz ] || test_failed $LINENO +[ -e a.lz ] || test_failed $LINENO rm -f a.lz b.gz c.gz || framework_failure cat in.bz2 > a.bz2 || framework_failure |