From 6ecddbaa92289fc6cbd3016b24c09db24cf1f2c2 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Thu, 19 Sep 2019 00:33:21 -0700 Subject: 5666 - start of sugar for structured control flow --- test_apps | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'test_apps') diff --git a/test_apps b/test_apps index a10538d1..29bd6075 100755 --- a/test_apps +++ b/test_apps @@ -309,14 +309,9 @@ test `uname` = 'Linux' && { echo } -# Only native runs beyond this point. We start using syntax that the emulator -# doesn't support. -test $EMULATED && echo "skipping remaining runs in emulated mode" -test $NATIVE || exit 0 - echo calls -cat 0*.subx apps/subx-common.subx apps/calls.subx | apps/sigils > a.sigils -./subx translate init.$OS a.sigils -o apps/calls +cat init.$OS 0*.subx apps/subx-common.subx apps/calls.subx | apps/sigils > a.sigils +./subx translate a.sigils -o apps/calls [ "$1" != record ] && git diff --exit-code apps/calls ./subx run apps/calls test echo @@ -325,6 +320,22 @@ test `uname` = 'Linux' && { echo } +echo braces +cat init.$OS 0*.subx apps/subx-common.subx apps/braces.subx | apps/calls | apps/sigils > a.sigils +./subx translate a.sigils -o apps/braces +[ "$1" != record ] && git diff --exit-code apps/braces +./subx run apps/braces test +echo +test `uname` = 'Linux' && { + apps/braces test + echo +} + +# Only native runs beyond this point. We start using syntax that the emulator +# doesn't support. +test $EMULATED && echo "skipping remaining runs in emulated mode" +test $NATIVE || exit 0 + echo "== translating using SubX" # example programs @@ -347,7 +358,7 @@ done # Phases of the self-hosted SubX translator. -for app in hex survey pack assort dquotes tests sigils calls +for app in hex survey pack assort dquotes tests sigils calls braces do echo $app ./ntranslate init.$OS 0*.subx apps/subx-common.subx apps/$app.subx -- cgit 1.4.1-2-gfad0