aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobin Haberkorn <rhaberkorn@fmsbw.de>2026-07-24 15:20:20 +0200
committerRobin Haberkorn <rhaberkorn@fmsbw.de>2026-07-24 15:20:20 +0200
commit1ce474195699345584aaa5a8999d3158d7d8ed87 (patch)
tree945c7db6090948053837d9f7dc8a8f29bd7e7e84
parent5d077c43ebc863da7eb0f05cac69de7353b34481 (diff)
fixed case-insensitive searches with non-ANSI (Unicode) patternsHEADmaster
* Since case-insensitivity is the default, you couldn't effectively search for non-ANSI characters, although character classes were not affected. * This was a terex bug, i.e. wasn't broken in v2.5.2. * Test cases have been added. The test case for searching for ^E (5) has been simplified using `^E<5>`.
m---------contrib/terex0
-rw-r--r--tests/testsuite.at10
2 files changed, 5 insertions, 5 deletions
diff --git a/contrib/terex b/contrib/terex
-Subproject b00e966f85221c3702a1f3f90e9494eb480876d
+Subproject 438128e7370d0a08f363bace4f690bd48f3804c
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 95c1336..887a833 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -274,15 +274,15 @@ TE_CHECK([[@EB'words-example.txt' Z-4J 2Y .-18"N(0/0)' 2C @Y Z-19"N(0/0)']], 0,
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.
-TE_CHECK(m4_format([[@I/^Q%c/ J @:S/^Q^Q^Q%c/"F(0/0)']], 5, 5), 0, ignore, ignore)
+# Searching for ^E (5)
+TE_CHECK([[5@I// J @:S/^Q^Q^E<5>/"F(0/0)']], 0, ignore, ignore)
+TE_CHECK([[@I/АБВГД/ J :@S/в/"F(0/0)' .-3"N(0/0)']], 0, ignore, ignore)
# Canse-sensitive search
TE_CHECK([[@I/XXX/J -^X @:S/xxx/"S(0/0)']], 0, ignore, ignore)
+TE_CHECK([[@I/АБВГД/J -^X :@S/в/"S(0/0)']], 0, ignore, ignore)
# Search mode should be local to the macro frame.
TE_CHECK([[-^X @^Um{^X} Mm-0"N(0/0)']], 0, ignore, ignore)
+# Anchored search
TE_CHECK([[@I/XYZ/ J ::@S/X/"F(0/0)' H::@S/Z/"S(0/0)']], 0, ignore, ignore)
AT_CLEANUP