From 8a8edaa2daf37f7c12e21b9199755b5de8e489f5 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 7 Aug 2026 20:47:22 +0200 Subject: don't crash on `0S...$`, but always throw an error * This has been broken for some time, but it didn't crash in v2.5.2. * Even when it did not crash, the search just failed. In TECO-11 (judging by TECOC), we must throw an error, though. Video TECO on the other hand always succeeds in such cases. * Added test case --- tests/testsuite.at | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/testsuite.at') diff --git a/tests/testsuite.at b/tests/testsuite.at index 571b5b7..eadf4fe 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -293,6 +293,8 @@ TE_CHECK([[@I/АБВГД/J -^X :@S/в/"S(0/0)']], 0, ignore, ignore) 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) +# 0-th searches: must always fail +TE_CHECK([[@I/XYZ/ J 0@S/XYZ/]], 1, ignore, ignore) AT_CLEANUP AT_SETUP([Searches over buffer boundaries]) -- cgit v1.2.3