about summary refs log tree commit diff stats
path: root/test_apps
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-05-24 20:36:31 -0700
committerKartik Agaram <vc@akkartik.com>2020-05-24 20:36:31 -0700
commit4d14c3fefd8362512e8e75d5051f7a7b709b483f (patch)
treee885a00f14fd15eb3116398d645bcfab6a0c5510 /test_apps
parent27b1e19ebec31eca1d29c4b8f18408b02c172578 (diff)
downloadmu-4d14c3fefd8362512e8e75d5051f7a7b709b483f.tar.gz
6393 - start running .mu apps in CI
Diffstat (limited to 'test_apps')
-rwxr-xr-xtest_apps57
1 files changed, 57 insertions, 0 deletions
diff --git a/test_apps b/test_apps
index e9532c66..b2d10472 100755
--- a/test_apps
+++ b/test_apps
@@ -338,4 +338,61 @@ echo mu
 ./translate_subx init.$OS [0-9]*.subx apps/mu.subx
 diff apps/mu a.elf
 
+# Mu programs
+
+echo ex1.mu
+./translate_mu apps/ex1.mu
+test $EMULATED  &&  {
+  ./bootstrap run a.elf  ||  ret=$?
+  test $ret -eq 42  # life, the universe and everything
+}
+test $NATIVE  &&  {
+  ./a.elf  ||  ret=$?
+  test $ret -eq 42  # life, the universe and everything
+}
+
+echo ex2.mu
+./translate_mu apps/ex2.mu
+test $EMULATED  &&  {
+  ./bootstrap run a.elf  ||  ret=$?
+  test $ret -eq 7
+}
+test $NATIVE  &&  {
+  ./a.elf  ||  ret=$?
+  test $ret -eq 7
+}
+
+echo ex2.2.mu
+./translate_mu apps/ex2.2.mu
+test $EMULATED  &&  {
+  ./bootstrap run a.elf  ||  ret=$?
+  test $ret -eq 4
+}
+test $NATIVE  &&  {
+  ./a.elf  ||  ret=$?
+  test $ret -eq 4
+}
+
+echo ex3.mu
+./translate_mu apps/ex3.mu
+test $EMULATED  &&  {
+  ./bootstrap run a.elf  ||  ret=$?
+  test $ret -eq 55
+}
+test $NATIVE  &&  {
+  ./a.elf  ||  ret=$?
+  test $ret -eq 55
+}
+
+echo ex3.2.mu
+./translate_mu apps/ex3.2.mu
+test $EMULATED  &&  {
+  ./bootstrap run a.elf  ||  ret=$?
+  test $ret -eq 55
+}
+test $NATIVE  &&  {
+  ./a.elf  ||  ret=$?
+  test $ret -eq 55
+}
+
 exit 0