From aa7b0bb1445feeefafdcf47fd639b10500b45c03 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 31 May 2026 21:19:24 +0200 Subject: implemented but disabled block-wise backwards search algorithm * The block-wise search algorithm allows for efficient backwards searches on large files. * On the downside the results are not entirely symmetric to forward searches. It therefore makes sense to still support the old correct but possibly slow algorithm. Since the old algorithm is just a special case of the new one (with a single block stretching the entire search range), you can configure the block size using `8EJ`. * Unfortunately, the new block-wise algorithm won't work due to a bug in GRegex (only in the glib wrapper code). It is therefore disabled for the time being by default and will probably only be enabled once we switch to a new regexp engine. See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/5199 --- tests/testsuite.at | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'tests/testsuite.at') diff --git a/tests/testsuite.at b/tests/testsuite.at index 74fab24..fc8ab37 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -670,11 +670,10 @@ AT_CLEANUP #AT_XFAIL_IF(true) #AT_CLEANUP -AT_SETUP([Recursion overflow]) -# Should no longer dump core. -# It could fail because the memory limit is exceeed, -# but not in this case since we limit the recursion. -TE_CHECK([[@^Um{U.a Q.a-100000"<%.aMm'} 0Mm]], 0, ignore, ignore) +AT_SETUP([Block-wise backwards search]) +# Crashes are caused by a glib bug when a match falls on block boundaries. +# See teco_do_search_backwards() +TE_CHECK([[2,8EJ @I/ABCD/ -:@S/BC/"F(0/0)' .-3"N(0/0)' ^S+2"N(0/0)']], 0, ignore, ignore) AT_XFAIL_IF(true) AT_CLEANUP @@ -684,6 +683,14 @@ TE_CHECK([[@I/ /J :@S/^ES^X/"S(0/0)']], 0, ignore, ignore) AT_XFAIL_IF(true) AT_CLEANUP +AT_SETUP([Recursion overflow]) +# Should no longer dump core. +# It could fail because the memory limit is exceeed, +# but not in this case since we limit the recursion. +TE_CHECK([[@^Um{U.a Q.a-100000"<%.aMm'} 0Mm]], 0, ignore, ignore) +AT_XFAIL_IF(true) +AT_CLEANUP + AT_SETUP([Rub out from empty string argument]) # Should rub out the modifiers as well. # Will currently fail because it tries to execute `:@{`. -- cgit v1.2.3