3 [ -f testing.sh ] && . testing.sh
5 #testing "name" "command" "result" "infile" "stdin"
7 echo -n "foo " | gzip > f1.gz
8 echo "bar" | gzip > f2.gz
10 # zcat is basically just `gzip -dc`...
11 testing "files" "zcat f1.gz f2.gz && test -f f1.gz && test -f f2.gz" \
14 # zcat -c is allowed, but the -c changes nothing.
15 testing "-c" "zcat -c f1.gz f2.gz && test -f f1.gz && test -f f2.gz" \
18 # TODO: how to test "zcat -f"?
20 rm -f f1 f2 f1.gz f2.gz