summaryrefslogtreecommitdiffstats
path: root/run_tests.fish
diff options
context:
space:
mode:
Diffstat (limited to 'run_tests.fish')
-rw-r--r--run_tests.fish18
1 files changed, 18 insertions, 0 deletions
diff --git a/run_tests.fish b/run_tests.fish
new file mode 100644
index 0000000..f91b8ae
--- /dev/null
+++ b/run_tests.fish
@@ -0,0 +1,18 @@
+#!/usr/bin/env fish
+
+set d (realpath (status dirname))
+
+cd $d/bytecode
+cargo build
+
+cd $d
+
+for f in $d/tests/*.sml
+ $d/bytecode/target/debug/bytecode (sml $d/main.sml -o /dev/stderr $f >/dev/null 2>| psub)
+ set -l got $status
+ if test $got -eq 42
+ echo (basename -s.sml $f): PASS
+ else
+ echo (basename -s.sml $f): FAIL "(status $got)"
+ end
+end