aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/testsuite.at
diff options
context:
space:
mode:
authorRobin Haberkorn <rhaberkorn@fmsbw.de>2026-06-29 00:15:46 +0200
committerRobin Haberkorn <rhaberkorn@fmsbw.de>2026-06-29 00:32:13 +0200
commit3522966d9584ec16e2f469acd0fe8727857a9d25 (patch)
treef361cd32d54cc874bd3714c1cf9248254638df1d /tests/testsuite.at
parentf08dea5fead2f9ef9e0fa114b2e09aa94908d629 (diff)
implemented the ^~ pattern match construct: the rest of the pattern will be an Advanced Regular Expression
* Allows searching by regular expressions. We will never support all ARE constructs in TECO patterns, so this is useful to have available. * Can only be typed upcaret. This leaves ^E~q available as an escape-regexp string building construct. * Once we replace the pattern2regexp converter with a custom terex lexer, we might want to restrict ^~ to the beginning of the pattern. Currently, however it can be anywhere, so you can mix TECO patterns with regular expressions.
Diffstat (limited to 'tests/testsuite.at')
-rw-r--r--tests/testsuite.at4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 0f7e32b..95c1336 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -293,6 +293,10 @@ TE_CHECK([[@I/XYZ/J @EB/foo/ @I/XZY/J @:FN/Z/0/"F(0/0)' Q*-2"N(0/0)'
@:FN///"F(0/0)' Q*-1"N(0/0)']], 0, ignore, ignore)
AT_CLEANUP
+AT_SETUP([Searches by regexp])
+TE_CHECK([[@I/ABC/J :@S/^~[A-Z]+/"F(0/0)']], 0, ignore, ignore)
+AT_CLEANUP
+
AT_SETUP([Search and insertion ranges])
# When deleting characters, the result of ^S/^Y must not change.
TE_CHECK([[@I/XXYYZZ/^SC ."N(0/0)' C @S/YY/ HK ^YU1U0 Q0-2"N(0/0)' Q1-4"N(0/0)']], 0, ignore, ignore)