source: zzuf/trunk/test/check-overflow @ 2573

Last change on this file since 2573 was 2573, checked in by Sam Hocevar, 12 years ago
  • Factored the test suite to avoid excessive code duplication.
  • Property svn:executable set to *
File size: 695 bytes
Line 
1#!/bin/sh
2
3. "$(dirname "$0")/functions.inc"
4
5PROGRAM="$DIR/bug-overflow"
6if [ ! -f "$PROGRAM" ]; then
7  echo "error: test/bug-overflow is missing"
8  exit 1
9fi
10
11start_test "zzuf buffer overflow test"
12
13new_test "bug-overflow < /file-00"
14if ! $PROGRAM < "$DIR/file-00"; then
15    fail_test " unexpected exit status $?"
16else
17    pass_test " OK"
18fi
19
20new_test "zzuf -qi -r0 bug-overflow < /file-00"
21if ! "$ZZUF" -r0 -qi "$PROGRAM" < "$DIR/file-00"; then
22    fail_test " unexpected exit status $?"
23else
24    pass_test " OK"
25fi
26
27new_test "zzuf -qi bug-overflow < file-00"
28if "$ZZUF" -qi "$PROGRAM" < "$DIR/file-00"; then
29    fail_test " unexpected exit status $?"
30else
31    pass_test " OK"
32fi
33
34stop_test
35
Note: See TracBrowser for help on using the repository browser.