From 274c86b0397198011756479218dd14262d9421ff Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 26 Jul 2022 07:52:19 +0200 Subject: Merging upstream version 1.12~pre2. Signed-off-by: Daniel Baumann --- testsuite/check.sh | 42 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) (limited to 'testsuite') 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 -- cgit v1.2.3