aboutsummaryrefslogtreecommitdiffstats
path: root/test/ccured_olden/bh/testit
diff options
context:
space:
mode:
Diffstat (limited to 'test/ccured_olden/bh/testit')
-rwxr-xr-xtest/ccured_olden/bh/testit21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/ccured_olden/bh/testit b/test/ccured_olden/bh/testit
new file mode 100755
index 00000000..8c758c7e
--- /dev/null
+++ b/test/ccured_olden/bh/testit
@@ -0,0 +1,21 @@
+#!/bin/sh
+# test a bh binary
+
+if [ "$1" = "" ]; then
+ echo "usage: $0 ./code.exe"
+ exit 0
+fi
+
+echo "running: $1 <data.in >data.out 2>/dev/null"
+if ! $1 <data.in >data.out 2>/dev/null; then
+ echo "$1 failed directly"
+ exit 2
+fi
+
+if ! perl ./normalize.pl <data.out | diff - data.orig.out >/dev/null; then
+ echo "$1 got the wrong answer"
+ exit 4
+else
+ echo "$1 seems to work"
+fi
+