Divya Kothari | 01e6a73 | 2014-09-03 13:38:18 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # Copyright 2014 Divya Kothari <divya.s.kothari@gmail.com> |
| 4 | # Copyright 2014 Naha Maggu <maggu.neha@gmail.com> |
| 5 | |
| 6 | [ -f testing.sh ] && . testing.sh |
| 7 | |
| 8 | #testing "name" "command" "result" "infile" "stdin" |
| 9 | echo "hello" > file |
| 10 | tar -czf file.gz file |
| 11 | # Get system zcat |
| 12 | zcatExe=`which zcat` |
| 13 | $zcatExe file.gz > zcatOut |
Rob Landley | 336c44a | 2016-03-02 15:20:04 -0600 | [diff] [blame] | 14 | testing "- decompresses a single file" "zcat file.gz > Tempfile && echo "yes"; diff Tempfile zcatOut && echo "yes"; rm -rf file* zcatOut Tempfile" "yes\nyes\n" "" "" |
Divya Kothari | 01e6a73 | 2014-09-03 13:38:18 -0500 | [diff] [blame] | 15 | |
| 16 | #testing "name" "command" "result" "infile" "stdin" |
| 17 | echo "hello" > file1 |
| 18 | echo "hi" > file2 |
| 19 | echo "Hi, Good morning !! I am a bzcat tester" > file3 |
| 20 | tar -czf file1.gz file1 |
| 21 | tar -czf file2.gz file2 |
| 22 | tar -czf file3.gz file3 |
| 23 | # Get system zcat |
| 24 | zcatExe=`which zcat` |
| 25 | $zcatExe file1.gz file2.gz file3.gz > zcatOut |
Rob Landley | 336c44a | 2016-03-02 15:20:04 -0600 | [diff] [blame] | 26 | testing "- decompresses multiple files" "zcat file1.gz file2.gz file3.gz > Tempfile && echo "yes" ; diff Tempfile zcatOut && echo "yes"; rm -rf file* zcatOut Tempfile " "yes\nyes\n" "" "" |