runtime(indent-tests): Raise timeouts for "search*()"es
Commit:
https://github.com/vim/vim/commit/5ecb452f5bd8bd2dd4fc2800953d5ecd9871f282
Author: Aliaksei Budavei <[email protected]>
Date: Sun Apr 13 22:24:46 2025 +0300
runtime(indent-tests): Raise timeouts for "search*()"es
Related to https://github.com/vim/vim/issues/15974 and
https://github.com/vim/vim/issues/16870.
closes: #17116
Signed-off-by: Aliaksei Budavei <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/indent/testdir/README.txt
b/runtime/indent/testdir/README.txt
index 65975605c..7454210ef 100644
--- a/runtime/indent/testdir/README.txt
+++ b/runtime/indent/testdir/README.txt
@@ -36,6 +36,9 @@ First of all, create a FILETYPE.in file. It should contain:
\ 'string'
" END_INDENT
+ When an indent script utilises timed "search*()"es and supports related
+ timeout configuration, consider setting a generous timeout value from
+ INDENT_EXE lines (look at "g:vim_indent" in "testdir/vim.in" for details).
Note that the command is not undone, you may need to reverse the effect for
the next block of lines.
diff --git a/runtime/indent/testdir/bitbake.in
b/runtime/indent/testdir/bitbake.in
index afd19be18..97b760fc5 100644
--- a/runtime/indent/testdir/bitbake.in
+++ b/runtime/indent/testdir/bitbake.in
@@ -1,6 +1,8 @@
# vim: set filetype=bitbake :
# START_INDENT
+# INDENT_EXE let g:pyindent_searchpair_timeout = 64
+# INDENT_EXE runtime autoload/python.vim
FOO = " \
bar \
baz \
diff --git a/runtime/indent/testdir/bitbake.ok
b/runtime/indent/testdir/bitbake.ok
index 1bc5a18c6..000ef5084 100644
--- a/runtime/indent/testdir/bitbake.ok
+++ b/runtime/indent/testdir/bitbake.ok
@@ -1,6 +1,8 @@
# vim: set filetype=bitbake :
# START_INDENT
+# INDENT_EXE let g:pyindent_searchpair_timeout = 64
+# INDENT_EXE runtime autoload/python.vim
FOO = " \
bar \
baz \
diff --git a/runtime/indent/testdir/html.in b/runtime/indent/testdir/html.in
index 4783a096d..72a38b93c 100644
--- a/runtime/indent/testdir/html.in
+++ b/runtime/indent/testdir/html.in
@@ -2,6 +2,7 @@
% START_INDENT
+% INDENT_EXE let b:html_indent_line_limit = 64
<html>
<body>
<style>
diff --git a/runtime/indent/testdir/html.ok b/runtime/indent/testdir/html.ok
index 496363446..c6ba3af27 100644
--- a/runtime/indent/testdir/html.ok
+++ b/runtime/indent/testdir/html.ok
@@ -2,6 +2,7 @@
% START_INDENT
+% INDENT_EXE let b:html_indent_line_limit = 64
<html>
<body>
<style>
diff --git a/runtime/indent/testdir/python.in b/runtime/indent/testdir/python.in
index 57719ee43..1f7654ae9 100644
--- a/runtime/indent/testdir/python.in
+++ b/runtime/indent/testdir/python.in
@@ -1,6 +1,8 @@
# vim: set ft=python sw=4 et:
# START_INDENT
+# INDENT_EXE let g:pyindent_searchpair_timeout = 256
+# INDENT_EXE runtime autoload/python.vim
dict = {
'a': 1,
'b': 2,
diff --git a/runtime/indent/testdir/python.ok b/runtime/indent/testdir/python.ok
index f5ebbc228..aaeb69cdf 100644
--- a/runtime/indent/testdir/python.ok
+++ b/runtime/indent/testdir/python.ok
@@ -1,6 +1,8 @@
# vim: set ft=python sw=4 et:
# START_INDENT
+# INDENT_EXE let g:pyindent_searchpair_timeout = 256
+# INDENT_EXE runtime autoload/python.vim
dict = {
'a': 1,
'b': 2,
diff --git a/runtime/indent/testdir/runtest.vim
b/runtime/indent/testdir/runtest.vim
index 9559a810b..dde8c5c47 100644
--- a/runtime/indent/testdir/runtest.vim
+++ b/runtime/indent/testdir/runtest.vim
@@ -14,19 +14,6 @@ set modeline
set debug=throw
set nomore
-" Remember the directory where we started.
-let indentDir = getcwd()
-cd ../../src/testdir
-
-" Needed for ValgrindOrAsan().
-source shared.vim
-exe 'cd ' .. fnameescape(indentDir)
-
-if ValgrindOrAsan()
- let g:vim_indent = {"searchpair_timeout": 1024}
- let g:python_indent = {"searchpair_timeout": 1024}
-endif
-
au! SwapExists * call HandleSwapExists()
func HandleSwapExists()
" Ignore finding a swap file for the test input and output, the user might be
diff --git a/runtime/indent/testdir/vim.in b/runtime/indent/testdir/vim.in
index 6b894b510..d5cae222f 100644
--- a/runtime/indent/testdir/vim.in
+++ b/runtime/indent/testdir/vim.in
@@ -1,6 +1,8 @@
" vim: set ft=vim sw=4 :
" START_INDENT
+" INDENT_EXE let g:vim_indent = {'searchpair_timeout': 1024}
+" INDENT_EXE runtime autoload/dist/vimindent.vim
func Some()
let x = 1
endfunc
diff --git a/runtime/indent/testdir/vim.ok b/runtime/indent/testdir/vim.ok
index 29878294b..d52eda6f5 100644
--- a/runtime/indent/testdir/vim.ok
+++ b/runtime/indent/testdir/vim.ok
@@ -1,6 +1,8 @@
" vim: set ft=vim sw=4 :
" START_INDENT
+" INDENT_EXE let g:vim_indent = {'searchpair_timeout': 1024}
+" INDENT_EXE runtime autoload/dist/vimindent.vim
func Some()
let x = 1
endfunc
diff --git a/runtime/indent/testdir/vim9.in b/runtime/indent/testdir/vim9.in
index a14d4e7d1..d4d0399e5 100644
--- a/runtime/indent/testdir/vim9.in
+++ b/runtime/indent/testdir/vim9.in
@@ -2,6 +2,8 @@ vim9script
# vim: set ft=vim sw=4 :
# START_INDENT
+# INDENT_EXE let g:vim_indent = {'searchpair_timeout': 8192}
+# INDENT_EXE runtime autoload/dist/vimindent.vim
var result = Func(
arg1,
arg2
@@ -455,7 +457,7 @@ enddef
# END_INDENT
# START_INDENT
-# INDENT_EXE let g:vim_indent = {'more_in_bracket_block': v:true}
+# INDENT_EXE let g:vim_indent.more_in_bracket_block = v:true
def Select(Cont: func(func(any)), Pred: func(any): bool): func(func(any))
return (Emit: func(any)) => {
Cont((t: any) => {
@@ -468,7 +470,7 @@ enddef
# END_INDENT
# START_INDENT
-# INDENT_EXE unlet! g:vim_indent
+# INDENT_EXE let g:vim_indent = {'searchpair_timeout': 8192}
# END_INDENT
# START_INDENT
diff --git a/runtime/indent/testdir/vim9.ok b/runtime/indent/testdir/vim9.ok
index e4ba72ca1..afad454af 100644
--- a/runtime/indent/testdir/vim9.ok
+++ b/runtime/indent/testdir/vim9.ok
@@ -2,6 +2,8 @@ vim9script
# vim: set ft=vim sw=4 :
# START_INDENT
+# INDENT_EXE let g:vim_indent = {'searchpair_timeout': 8192}
+# INDENT_EXE runtime autoload/dist/vimindent.vim
var result = Func(
arg1,
arg2
@@ -455,7 +457,7 @@ enddef
# END_INDENT
# START_INDENT
-# INDENT_EXE let g:vim_indent = {'more_in_bracket_block': v:true}
+# INDENT_EXE let g:vim_indent.more_in_bracket_block = v:true
def Select(Cont: func(func(any)), Pred: func(any): bool): func(func(any))
return (Emit: func(any)) => {
Cont((t: any) => {
@@ -468,7 +470,7 @@ enddef
# END_INDENT
# START_INDENT
-# INDENT_EXE unlet! g:vim_indent
+# INDENT_EXE let g:vim_indent = {'searchpair_timeout': 8192}
# END_INDENT
# START_INDENT
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1u64l1-00CJlP-0V%40256bit.org.