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