| Revision 4253,
1.1 KB
checked in by sam, 3 years ago
(diff) |
|
Fix copyright information and remove Id tag everywhere.
|
-
Property svn:executable set to
*
|
| Line | |
|---|
| 1 | #!/bin/sh |
|---|
| 2 | # |
|---|
| 3 | # check-div0 - check that zzuf can catch divisions by zero |
|---|
| 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-div0" |
|---|
| 19 | if [ ! -f "$PROGRAM" ]; then |
|---|
| 20 | echo "error: test/bug-div0 is missing" |
|---|
| 21 | exit 1 |
|---|
| 22 | fi |
|---|
| 23 | |
|---|
| 24 | start_test "zzuf division-by-zero test" |
|---|
| 25 | |
|---|
| 26 | new_test "bug-div0 < /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-div0 < /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-div0 < file-00" |
|---|
| 41 | if $ZZUF -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 | |
|---|
| 49 | exit 0 |
|---|
| 50 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.