aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorRobin Haberkorn <rhaberkorn@fmsbw.de>2026-05-31 21:19:24 +0200
committerRobin Haberkorn <rhaberkorn@fmsbw.de>2026-05-31 21:19:24 +0200
commitaa7b0bb1445feeefafdcf47fd639b10500b45c03 (patch)
tree529351a0ee2862448680b0189d7ee72768f45357 /tests
parent957f24cf63261424288a8794f61cfdf5e5606fad (diff)
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
Diffstat (limited to 'tests')
-rw-r--r--tests/testsuite.at17
1 files changed, 12 insertions, 5 deletions
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 `:@{`.