• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 -czf file.gz file
11# Get system zcat
12zcatExe=`which zcat`
13$zcatExe file.gz > zcatOut
14testing "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"
17echo "hello" > file1
18echo "hi" > file2
19echo "Hi, Good morning !! I am a bzcat tester" > file3
20tar -czf file1.gz file1
21tar -czf file2.gz file2
22tar -czf file3.gz file3
23# Get system zcat
24zcatExe=`which zcat`
25$zcatExe file1.gz file2.gz file3.gz > zcatOut
26testing "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