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