about summary refs log tree commit diff stats
path: root/test_apps
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-08-16 00:28:03 -0700
committerKartik Agaram <vc@akkartik.com>2019-08-16 00:28:44 -0700
commita8adfff398efb277fade0c96276953ce773b80bf (patch)
tree9726a1069aeac637dc50dc5b4d0c38796c665a61 /test_apps
parent05b95e0aafd208f5f73e48dce905b1b59d8770c1 (diff)
downloadmu-a8adfff398efb277fade0c96276953ce773b80bf.tar.gz
fix a missing test of desugar in CI
Diffstat (limited to 'test_apps')
-rwxr-xr-xtest_apps20
1 files changed, 20 insertions, 0 deletions
diff --git a/test_apps b/test_apps
index 17b38d68..8cf6d81a 100755
--- a/test_apps
+++ b/test_apps
@@ -12,6 +12,8 @@ CFLAGS=$CFLAGS ./build
 
 echo "== translating and running using C++"
 
+# example programs
+
 echo ex1
 ./subx translate examples/ex1.subx  -o examples/ex1
 [ "$1" != record ]  &&  git diff --exit-code examples/ex1
@@ -130,6 +132,8 @@ echo ex12
 ./subx run examples/ex12  # final byte of mmap'd address is well-nigh guaranteed to be 0
 test `uname` = 'Linux'  &&  examples/ex12
 
+# Larger apps that use the standard library.
+
 echo factorial
 ./subx translate 0*.subx apps/factorial.subx  -o apps/factorial
 [ "$1" != record ]  &&  git diff --exit-code apps/factorial
@@ -176,6 +180,8 @@ test `uname` = 'Linux'  &&  {
   grep -q 'lookup failed' handle.out  ||  { echo "missing failure test"; exit 1; }
 }
 
+# Phases of the self-hosted SubX translator.
+
 echo hex
 ./subx translate 0*.subx apps/subx-common.subx apps/hex.subx  -o apps/hex
 [ "$1" != record ]  &&  git diff --exit-code apps/hex
@@ -236,8 +242,22 @@ test `uname` = 'Linux'  &&  {
   echo
 }
 
+# Higher-level syntax.
+
+echo desugar
+./subx translate 0*.subx apps/subx-common.subx apps/desugar.subx  -o apps/desugar
+[ "$1" != record ]  &&  git diff --exit-code apps/desugar
+./subx run apps/desugar test
+echo
+test `uname` = 'Linux'  &&  {
+  apps/desugar test
+  echo
+}
+
 echo "== translating using SubX"
 
+# example programs
+
 echo ex1
 cat examples/ex1.subx |./subx_bin run apps/tests |./subx_bin run apps/dquotes |./subx_bin run apps/assort |./subx_bin run apps/pack |./subx_bin run apps/survey |./subx_bin run apps/hex |diff examples/ex1 -
 test `uname` = 'Linux'  &&  {