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" 9echo "hello" > file 10tar -cjf file.tar.bz2 file 11# Get system bzcat 12bzcatExe=`which bzcat` 13$bzcatExe file.tar.bz2 > bzcatOut 14testing "bzcat - decompresses a single file" "bzcat file.tar.bz2 > Tempfile && echo "yes"; diff Tempfile bzcatOut && echo "yes"; rm -rf file* bzcatOut Tempfile" "yes\nyes\n" "" "" 15 16#testing "name" "command" "result" "infile" "stdin" 17echo "hello" > file1 18echo "hi" > file2 19echo "Hi, Good morning !! I am a bzcat tester" > file3 20tar -cjf file1.tar.bz2 file1 21tar -cjf file2.tar.bz2 file2 22tar -cjf file3.tar.bz2 file3 23# Get system bzcat 24bzcatExe=`which bzcat` 25$bzcatExe file1.tar.bz2 file2.tar.bz2 file3.tar.bz2 > bzcatOut 26testing "bzcat - 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" "" "" 27