aboutsummaryrefslogtreecommitdiffstats
path: root/test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test.sh')
-rwxr-xr-xtest.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/test.sh b/test.sh
new file mode 100755
index 0000000..e41e985
--- /dev/null
+++ b/test.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+run() {
+ prog=$1
+ desired=$2
+ out=`./build/tuplr $prog`
+ if [ "$out" != "$desired" ]; then
+ echo "FAIL: $prog";
+ echo " Expected: \"$desired\"";
+ echo " Output: \"$out\"";
+ else
+ echo "PASS: $prog"
+ fi
+}
+
+run './test/ack.tpr' '8189 : Int'
+run './test/def.tpr' '3 : Int'
+run './test/fac.tpr' '720 : Int'
+run './test/nest.tpr' '6 : Int'