OSDN Git Service

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