chiark / gitweb /
Add some tests.
[vbig.git] / t-truncated
1 #! /bin/sh
2 set -e
3 rm -f testfile
4 ./vbig --seed chahthaiquiyouto --create testfile 65536
5 truncate --size=32768 testfile
6 if ./vbig --seed chahthaiquiyouto --verify testfile 65536 2>testoutput; then
7   echo >&2 ERROR: verify unexpectedly succeeded
8   exit 1
9 fi
10 echo 'ERROR: testfile: truncated at 32768/65536 bytes' > testexpect
11 diff -u testexpect testoutput
12 rm -f testfile testoutput testexpect