aboutsummaryrefslogtreecommitdiff
path: root/testsuite/bzcat.tests
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/bzcat.tests')
-rwxr-xr-xtestsuite/bzcat.tests30
1 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/bzcat.tests b/testsuite/bzcat.tests
index 5b4f3f4b3..1c1fd6563 100755
--- a/testsuite/bzcat.tests
+++ b/testsuite/bzcat.tests
@@ -51,4 +51,34 @@ prep; check "bzcat: dont delete src" "${bb}bzcat t2.bz2; test -f t2.bz2 && echo
51) 51)
52rm -rf testdir 52rm -rf testdir
53 53
54
55
56# Copyright 2011 by Denys Vlasenko
57# Licensed under GPLv2, see file LICENSE in this source tree.
58
59. ./testing.sh
60
61# testing "test name" "command" "expected result" "file input" "stdin"
62
63# "input" file is bzipped file with "a\n" data
64testing "bzcat can print many files" \
65"$ECHO -ne '$hexdump' | bzcat input input; echo \$?" \
66"\
67a
68a
690
70" "\
71\x42\x5a\x68\x39\x31\x41\x59\x26\x53\x59\x63\x3e\xd6\xe2\x00\x00\
72\x00\xc1\x00\x00\x10\x20\x00\x20\x00\x21\x00\x82\xb1\x77\x24\x53\
73\x85\x09\x06\x33\xed\x6e\x20\
74" ""
75
76# "input" file is bzipped zero byte file
77testing "bzcat can handle compressed zero-length bzip2 files" \
78"$ECHO -ne '$hexdump' | bzcat input input; echo \$?" \
79"0\n" \
80"\x42\x5a\x68\x39\x17\x72\x45\x38\x50\x90\x00\x00\x00\x00" ""
81
82
83
54exit $((FAILCOUNT <= 255 ? FAILCOUNT : 255)) 84exit $((FAILCOUNT <= 255 ? FAILCOUNT : 255))