aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/testsuite.at
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2024-10-04 23:41:16 +0400
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2024-10-04 23:41:16 +0400
commitb36ff2502ae3b0e18fa862a01fba9cc2c9067e31 (patch)
treee4ffef55d060b77706b65ca48c6c0ae62a57e89e /tests/testsuite.at
parent024d26ac0cd869826801889f1299df34676fdf57 (diff)
downloadsciteco-b36ff2502ae3b0e18fa862a01fba9cc2c9067e31.tar.gz
pattern match characters support ^Q/^R now as well
* makes it possible, albeit cumbersome, to escape pattern match characters * For instance, to search for ^Q, you now have to type S^Q^Q^Q^Q$. To search for ^E you have to type S^Q^Q^Q^E$. But the last character cannot be typed with carets currently (FIXME?). For pattern-only characters, two ^Q should be sufficient as in S^Q^Q^X$. * Perhaps it would be more elegant to abolish the difference between string building and pattern matching characters to avoid double quoting. But then all string building constructs like ^EQq should operate at the pattern level as well (ie. match the contents of register q verbatim instead of being interpreted as a pattern). TECOC and TECO-64 don't do that either. If we leave everything as it is, at least a new string building construct should be added for auto-quoting patterns (analoguous to ^EN and ^E@).
Diffstat (limited to 'tests/testsuite.at')
-rw-r--r--tests/testsuite.at8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/testsuite.at b/tests/testsuite.at
index fc7de4f..33f1bf5 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -79,6 +79,14 @@ AT_CHECK([$SCITECO -e "[[a 23Ub ]]b Qb\"N(0/0)'"], 0, ignore, ignore)
AT_CHECK([$SCITECO -e "[[\$ @FG'..' ]]\$ :Q\$-1Q\$-^^r\"=(0/0)'"], 0, ignore, ignore)
AT_CLEANUP
+AT_SETUP([Searches])
+# FIXME: We cannot currently easily insert a single ASCII 5 (^E), as it must be followed
+# by a 2nd character. It can be quoted, but cannot be written as Caret+E.
+# You also cannot search for a single ASCII 5 using Caret+E.
+# 2 additional ^Q are translated to a single ^Q and interpreted at the search-pattern layer.
+AT_CHECK([$SCITECO -e "@I/^Q\05/ J @:S/^Q^Q^Q\05/\"F(0/0)'"], 0, ignore, ignore)
+AT_CLEANUP
+
AT_SETUP([Editing local registers in macro calls])
AT_CHECK([$SCITECO -e '@^Ua{@EQ.x//} :Ma @^U.x/FOO/'], 0, ignore, ignore)
AT_CHECK([$SCITECO -e '@^Ua{@EQ.x//} Ma @^U.x/FOO/'], 1, ignore, ignore)