aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2024-10-15 01:46:52 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2024-10-15 01:46:52 +0300
commit820f716dd16008eef386f6541fa76dcbac793a9b (patch)
tree3b356d114edbec5315de43a400d6888ed4137759 /tests
parent43924ddb3059a011760346b5b5c65587d80502e9 (diff)
downloadsciteco-820f716dd16008eef386f6541fa76dcbac793a9b.tar.gz
improved support for braces within loops: warn about unclosed braces and allow breaking from within braces
For instance, you can now write <23(1;)> without leaving anything on the stack.
Diffstat (limited to 'tests')
-rw-r--r--tests/testsuite.at7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 33f1bf5..676ca59 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -13,6 +13,8 @@ AT_COLOR_TESTS
# (translated to [ ... ]) in simple cases where balanced
# brackets are required in TECO code as well and
# quadrigraphs (@<:@ and @:>@) in all other cases.
+# Single round brackets also have to be replaced with the
+# quadrigraphs @{:@ and @:}@.
AT_BANNER([Features])
@@ -45,6 +47,11 @@ AT_SETUP([Closing loops at the correct macro level])
AT_CHECK([$SCITECO -e '@^Ua{>} <Ma'], 1, ignore, ignore)
AT_CLEANUP
+AT_SETUP([Braces in loops])
+AT_CHECK([$SCITECO -e "1<23@{:@42>"], 1, ignore, ignore)
+AT_CHECK([$SCITECO -e "1<23(1;)> \"~|(0/0)'"], 0, ignore, ignore)
+AT_CLEANUP
+
AT_SETUP([Pass-through loops])
# NOTE: This requires the <=>, so that values get consumed from the stack.
# More elegant would be a command for popping exactly one argument like <:$>.