source: zzuf/trunk/test/check-div0 @ 4120

Last change on this file since 4120 was 4120, checked in by sam, 5 years ago

Add a workaround in the test suite for a cowdancer limitation causing .ilist
corruption and use ulimit instead of limit.

  • Property svn:executable set to *
File size: 693 bytes
Line 
1#!/bin/sh
2
3. "$(dirname "$0")/functions.inc"
4
5ulimit -c 0
6
7PROGRAM="$DIR/bug-div0"
8if [ ! -f "$PROGRAM" ]; then
9  echo "error: test/bug-div0 is missing"
10  exit 1
11fi
12
13start_test "zzuf division-by-zero test"
14
15new_test "bug-div0 < /file-00"
16if ! $PROGRAM < "$DIR/file-00"; then
17    fail_test " unexpected exit status $?"
18else
19    pass_test " OK"
20fi
21
22new_test "zzuf -qi -r0 bug-div0 < /file-00"
23if ! $ZZUF -r0 -qi "$PROGRAM" < "$DIR/file-00"; then
24    fail_test " unexpected exit status $?"
25else
26    pass_test " OK"
27fi
28
29new_test "zzuf -qi bug-div0 < file-00"
30if $ZZUF -qi "$PROGRAM" < "$DIR/file-00"; then
31    fail_test " unexpected exit status $?"
32else
33    pass_test " OK"
34fi
35
36stop_test
37
38exit 0
39
Note: See TracBrowser for help on using the repository browser.