zzuf/test/check-div0
Sam Hocevar cae540ebf6 Add a workaround in the test suite for a cowdancer limitation causing .ilist
corruption and use ulimit instead of limit.
2009-12-14 02:55:25 +00:00

40 lines
693 B
Bash
Executable File

#!/bin/sh
. "$(dirname "$0")/functions.inc"
ulimit -c 0
PROGRAM="$DIR/bug-div0"
if [ ! -f "$PROGRAM" ]; then
echo "error: test/bug-div0 is missing"
exit 1
fi
start_test "zzuf division-by-zero test"
new_test "bug-div0 < /file-00"
if ! $PROGRAM < "$DIR/file-00"; then
fail_test " unexpected exit status $?"
else
pass_test " OK"
fi
new_test "zzuf -qi -r0 bug-div0 < /file-00"
if ! $ZZUF -r0 -qi "$PROGRAM" < "$DIR/file-00"; then
fail_test " unexpected exit status $?"
else
pass_test " OK"
fi
new_test "zzuf -qi bug-div0 < file-00"
if $ZZUF -qi "$PROGRAM" < "$DIR/file-00"; then
fail_test " unexpected exit status $?"
else
pass_test " OK"
fi
stop_test
exit 0