summaryrefslogtreecommitdiffstats
path: root/testsuite/check.sh
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-08 04:19:42 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-08 04:19:42 +0000
commit511feb57cfea29b1f6ba303cedd1456f5cecd69e (patch)
treed2aaf1e03feec10c28a6e5d156213b3eb76613ea /testsuite/check.sh
parentAdding debian version 0.9~rc1-1. (diff)
downloadzutils-511feb57cfea29b1f6ba303cedd1456f5cecd69e.tar.xz
zutils-511feb57cfea29b1f6ba303cedd1456f5cecd69e.zip
Merging upstream version 0.9~rc2.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'testsuite/check.sh')
-rwxr-xr-xtestsuite/check.sh51
1 files changed, 35 insertions, 16 deletions
diff --git a/testsuite/check.sh b/testsuite/check.sh
index 073843e..c32c3fe 100755
--- a/testsuite/check.sh
+++ b/testsuite/check.sh
@@ -37,6 +37,9 @@ done
printf "testing zutils-%s..." "$2"
cat "${testdir}"/test.txt > in || framework_failure
+cat "${testdir}"/test.txt.tar > in.tar || framework_failure
+printf "01234567890" > pin.tar || framework_failure
+cat in.tar in.tar in.tar in.tar >> pin.tar || framework_failure
cat in > -in- || framework_failure
cat in.lz > -in-.lz || framework_failure
cat in.lz > lz_only.lz || framework_failure
@@ -84,6 +87,8 @@ for i in ${extensions}; do
printf .
done
+"${ZCMP}" in.tar pin.tar > /dev/null
+if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi
"${ZCMP}" - || fail=1
printf .
"${ZCMP}" in in || fail=1
@@ -130,6 +135,8 @@ for i in ${extensions}; do
printf .
done
+#"${ZDIFF}" in.tar pin.tar > /dev/null
+#if [ $? != 1 ] ; then fail=1 ; printf - ; else printf . ; fi
"${ZDIFF}" - || fail=1
printf .
"${ZDIFF}" in in || fail=1
@@ -168,44 +175,56 @@ printf .
printf "\ntesting zgrep-%s..." "$2"
for i in ${extensions}; do
- "${ZGREP}" License in.$i > /dev/null || fail=1
- "${ZGREP}" nx_pattern in.$i > /dev/null && fail=1
+ "${ZGREP}" "GNU" in.$i > /dev/null || fail=1
+ "${ZGREP}" "nx_pattern" in.$i > /dev/null && fail=1
printf .
done
-"${ZGREP}" -r License . > /dev/null || fail=1
+"${ZGREP}" "GNU" < pin.tar > /dev/null || fail=1
printf .
-"${ZGREP}" nx_pattern -r . in > /dev/null && fail=1
+"${ZGREP}" "GNU" pin.tar > /dev/null || fail=1
printf .
-"${ZGREP}" License < in > /dev/null || fail=1
+"${ZGREP}" -r "GNU" . > /dev/null || fail=1
printf .
-"${ZGREP}" License < in.gz > /dev/null || fail=1
+"${ZGREP}" "nx_pattern" -r . in > /dev/null && fail=1
printf .
-"${ZGREP}" License < in.bz2 > /dev/null || fail=1
+"${ZGREP}" "GNU" < in > /dev/null || fail=1
printf .
-"${ZGREP}" License < in.lz > /dev/null || fail=1
+"${ZGREP}" "GNU" < in.gz > /dev/null || fail=1
printf .
-"${ZGREP}" License in > /dev/null || fail=1
+"${ZGREP}" "GNU" < in.bz2 > /dev/null || fail=1
printf .
-"${ZGREP}" License -- -in- > /dev/null || fail=1
+"${ZGREP}" "GNU" < in.lz > /dev/null || fail=1
printf .
-"${ZGREP}" License -- -in-.lz > /dev/null || fail=1
+"${ZGREP}" "GNU" in > /dev/null || fail=1
printf .
-"${ZGREP}" License in in.gz in.bz2 in.lz -- -in- > /dev/null || fail=1
+"${ZGREP}" "GNU" -- -in- > /dev/null || fail=1
printf .
-"${ZEGREP}" License in > /dev/null || fail=1
+"${ZGREP}" "GNU" -- -in-.lz > /dev/null || fail=1
printf .
-"${ZFGREP}" License in > /dev/null || fail=1
+"${ZGREP}" "GNU" in in.gz in.bz2 in.lz -- -in- > /dev/null || fail=1
+printf .
+"${ZEGREP}" "GNU" in > /dev/null || fail=1
+printf .
+"${ZFGREP}" "GNU" in > /dev/null || fail=1
printf .
printf "\ntesting ztest-%s..." "$2"
"${ZTEST}" in in.gz in.bz2 in.lz -- -in- || fail=1
printf .
-"${ZTEST}" -r . || fail=1
+"${ZTEST}" < in.gz || fail=1
printf .
-printf "LZIPvs0000000000000000000000" | "${ZTEST}" 2>/dev/null && fail=1
+"${ZTEST}" < in.bz2 || fail=1
+printf .
+"${ZTEST}" < in.lz || fail=1
+printf .
+"${ZTEST}" -r . || fail=1
printf .
+"${ZTEST}" < in 2>/dev/null
+if [ $? = 0 ] ; then fail=1 ; printf - ; else printf . ; fi
+printf "LZIPvs0000000000000000000000" | "${ZTEST}" 2>/dev/null
+if [ $? = 0 ] ; then fail=1 ; printf - ; else printf . ; fi
echo
if [ ${fail} = 0 ] ; then