3 # Copyright 2014 Divya Kothari <divya.s.kothari@gmail.com>
4 # Copyright 2014 Naha Maggu <maggu.neha@gmail.com>
6 [ -f testing.sh ] && . testing.sh
8 #testing "name" "command" "result" "infile" "stdin"
10 'bzcat "$FILES/bzcat/overflow.bz2" >/dev/null 2>/dev/null ;
11 [ $? -eq 1 ] && echo good' "good\n" "" ""
14 tar -cjf file.tar.bz2 file
16 bzcatExe=`which bzcat`
17 $bzcatExe file.tar.bz2 > bzcatOut
18 testing "- decompresses a single file" "bzcat file.tar.bz2 > Tempfile && echo "yes"; diff Tempfile bzcatOut && echo "yes"; rm -rf file* bzcatOut Tempfile" "yes\nyes\n" "" ""
20 #testing "name" "command" "result" "infile" "stdin"
23 echo "Hi, Good morning !! I am a bzcat tester" > file3
24 tar -cjf file1.tar.bz2 file1
25 tar -cjf file2.tar.bz2 file2
26 tar -cjf file3.tar.bz2 file3
28 bzcatExe=`which bzcat`
29 $bzcatExe file1.tar.bz2 file2.tar.bz2 file3.tar.bz2 > bzcatOut
30 testing "- decompresses multiple files" "bzcat file1.tar.bz2 file2.tar.bz2 file3.tar.bz2 > Tempfile && echo "yes" ; diff Tempfile bzcatOut && echo "yes"; rm -rf file* bzcatOut Tempfile " "yes\nyes\n" "" ""