summaryrefslogtreecommitdiff
path: root/testing.sh
diff options
context:
space:
mode:
authorkdx <kikoodx@paranoici.org>2023-06-09 20:14:14 +0200
committerkdx <kikoodx@paranoici.org>2023-06-09 20:14:14 +0200
commita82211bc77beb8ee7469f08a568481157ea56f6c (patch)
treed928125279e2656f93d80b21a816cd6283d1c6b2 /testing.sh
parentb951fda40057cca936867f9d8240f676fa3639ec (diff)
downloadgolem-a82211bc77beb8ee7469f08a568481157ea56f6c.tar.gz
discard stack & testing suite
Diffstat (limited to 'testing.sh')
-rwxr-xr-xtesting.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/testing.sh b/testing.sh
new file mode 100755
index 0000000..1d636b1
--- /dev/null
+++ b/testing.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+function test() {
+ CODE="$1"
+ echo "--- $CODE ---"
+ ./build/golem "$CODE" >"build/tmp.orgaasm"
+ orgaasm "build/tmp.orgaasm" "build/tmp.rom"
+ orgaemu "build/tmp.rom"
+}
+
+tup || exit 1
+test '5 + 2;'
+test '6 + 3;'
+rm -f build/tmp.*