| Revision 4272,
1.2 KB
checked in by sam, 3 years ago
(diff) |
|
Rename check-flag-# tests to check-zzuf-#-#### with the option's long name,
to avoid problems with case-insensitive filesystems.
|
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | #!/bin/sh |
|---|
| 2 | # |
|---|
| 3 | # check-zzuf-M-max-memory - check that zzuf catches excessive memory allocs |
|---|
| 4 | # Copyright (c) 2008-2010 Sam Hocevar <sam@hocevar.net> |
|---|
| 5 | # All Rights Reserved |
|---|
| 6 | # |
|---|
| 7 | # This program is free software. It comes without any warranty, to |
|---|
| 8 | # the extent permitted by applicable law. You can redistribute it |
|---|
| 9 | # and/or modify it under the terms of the Do What The Fuck You Want |
|---|
| 10 | # To Public License, Version 2, as published by Sam Hocevar. See |
|---|
| 11 | # http://sam.zoy.org/wtfpl/COPYING for more details. |
|---|
| 12 | # |
|---|
| 13 | |
|---|
| 14 | . "$(dirname "$0")/functions.inc" |
|---|
| 15 | |
|---|
| 16 | ulimit -c 0 |
|---|
| 17 | |
|---|
| 18 | PROGRAM="$DIR/bug-memory" |
|---|
| 19 | if [ ! -f "$PROGRAM" ]; then |
|---|
| 20 | echo "error: test/bug-memory is missing" |
|---|
| 21 | exit 1 |
|---|
| 22 | fi |
|---|
| 23 | |
|---|
| 24 | start_test "zzuf -M test" |
|---|
| 25 | |
|---|
| 26 | new_test "bug-memory < /file-00" |
|---|
| 27 | if ! $PROGRAM < "$DIR/file-00"; then |
|---|
| 28 | fail_test " unexpected exit status $?" |
|---|
| 29 | else |
|---|
| 30 | pass_test " OK" |
|---|
| 31 | fi |
|---|
| 32 | |
|---|
| 33 | new_test "zzuf -qi -r0 bug-memory < /file-00" |
|---|
| 34 | if ! $ZZUF -r0 -qi "$PROGRAM" < "$DIR/file-00"; then |
|---|
| 35 | fail_test " unexpected exit status $?" |
|---|
| 36 | else |
|---|
| 37 | pass_test " OK" |
|---|
| 38 | fi |
|---|
| 39 | |
|---|
| 40 | new_test "zzuf -qi bug-memory < file-00" |
|---|
| 41 | if $ZZUF -M 256 -qi "$PROGRAM" < "$DIR/file-00"; then |
|---|
| 42 | fail_test " unexpected exit status $?" |
|---|
| 43 | else |
|---|
| 44 | pass_test " OK" |
|---|
| 45 | fi |
|---|
| 46 | |
|---|
| 47 | stop_test |
|---|
| 48 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.