From 1ce474195699345584aaa5a8999d3158d7d8ed87 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 24 Jul 2026 15:20:20 +0200 Subject: fixed case-insensitive searches with non-ANSI (Unicode) patterns * 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>`. --- contrib/terex | 2 +- tests/testsuite.at | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/terex b/contrib/terex index b00e966..438128e 160000 --- a/contrib/terex +++ b/contrib/terex @@ -1 +1 @@ -Subproject commit b00e966f85221c3702a1f3f90e9494eb480876dd +Subproject commit 438128e7370d0a08f363bace4f690bd48f3804cc 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 -- cgit v1.2.3