bzcat.test 504 B

12345678910111213141516
  1. #!/bin/bash
  2. [ -f testing.sh ] && . testing.sh
  3. #testing "name" "command" "result" "infile" "stdin"
  4. testing "2 known files" \
  5. 'bzcat "$FILES/blkid/"{minix,ntfs}.bz2 | sha1sum | cut -d " " -f 1' \
  6. 'c0b7469c9660d6056a988ef8a7fe73925efc9266\n' '' ''
  7. testing "overflow" \
  8. 'bzcat "$FILES/bzcat/overflow.bz2" >/dev/null 2>/dev/null ;
  9. [ $? -ne 0 ] && echo good' "good\n" "" ""
  10. testing "badcrc" \
  11. 'bzcat "$FILES/bzcat/badcrc.bz2" > /dev/null 2>/dev/null ;
  12. [ $? -ne 0 ] && echo good' "good\n" "" ""