diff options
Diffstat (limited to 'test/ccured_olden/health/testit')
-rwxr-xr-x | test/ccured_olden/health/testit | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/ccured_olden/health/testit b/test/ccured_olden/health/testit new file mode 100755 index 00000000..6b943eac --- /dev/null +++ b/test/ccured_olden/health/testit @@ -0,0 +1,25 @@ +#!/bin/sh +# test a health binary + +if [ "$1" = "" ]; then + echo "usage: $0 ./health.exe" + exit +fi + +# all of health's output is to stderr +echo "running: $1 5 500 1 1 2>output" +if ! $1 5 500 1 1 2>output; then + echo "$1 failed directly" + exit 2 +fi + +if ! diff out.orig output >out.diff 2>&1 ; then + if ! diff out.orig.msvc output >/dev/null ; then + echo "$1 got the wrong answer. See out.diff" + exit 4 + fi +fi + +echo "$1 seems to work" +rm -f out.diff +
\ No newline at end of file |