From 14ca871ebbc17f70769e67b3150890153b77b425 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 23 Apr 2016 05:26:17 -0500 Subject: Remove inappropriate bzip tests (we're not comparing with random "host version") replace with testing 2 known files out of blkid tests, and add badcrc test. --- tests/bzcat.test | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) (limited to 'tests/bzcat.test') diff --git a/tests/bzcat.test b/tests/bzcat.test index f57a2f88..0975f3d6 100755 --- a/tests/bzcat.test +++ b/tests/bzcat.test @@ -1,30 +1,16 @@ #!/bin/bash -# Copyright 2014 Divya Kothari -# Copyright 2014 Naha Maggu - [ -f testing.sh ] && . testing.sh #testing "name" "command" "result" "infile" "stdin" +testing "2 known files" \ + 'bzcat "$FILES/blkid/"{minix,ntfs}.bz2 | sha1sum | '"awk '{print \$1}'" \ + 'c0b7469c9660d6056a988ef8a7fe73925efc9266\n' '' '' + testing "overflow" \ 'bzcat "$FILES/bzcat/overflow.bz2" >/dev/null 2>/dev/null ; - [ $? -eq 1 ] && echo good' "good\n" "" "" + [ $? -ne 0 ] && echo good' "good\n" "" "" -echo "hello" > file -tar -cjf file.tar.bz2 file -# Get system bzcat -bzcatExe=`which bzcat` -$bzcatExe file.tar.bz2 > bzcatOut -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" "" "" - -#testing "name" "command" "result" "infile" "stdin" -echo "hello" > file1 -echo "hi" > file2 -echo "Hi, Good morning !! I am a bzcat tester" > file3 -tar -cjf file1.tar.bz2 file1 -tar -cjf file2.tar.bz2 file2 -tar -cjf file3.tar.bz2 file3 -# Get system bzcat -bzcatExe=`which bzcat` -$bzcatExe file1.tar.bz2 file2.tar.bz2 file3.tar.bz2 > bzcatOut -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" "" "" +testing "badcrc" \ + 'bzcat "$FILES/bzcat/badcrc.bz2" > /dev/null 2>/dev/null ; + [ $? -ne 0 ] && echo good' "good\n" "" "" -- cgit v1.2.3