Home | History | Annotate | Download | only in tests
      1 #!/bin/bash
      2 
      3 # Copyright 2014 Divya Kothari <divya.s.kothari (at] gmail.com>
      4 # Copyright 2014 Naha Maggu <maggu.neha (at] 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
     14 testing "zcat - decompresses a single file" "zcat file.gz > Tempfile && echo "yes"; diff Tempfile zcatOut && echo "yes"; rm -rf file* zcatOut Tempfile" "yes\nyes\n" "" ""
     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
     26 testing "zcat - 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" "" ""
     27