1
0
forked from aniani/vim

runtime(indent-tests): Raise timeouts for "search*()"es

Related to #15974 and #16870.

closes: #17116

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Aliaksei Budavei
2025-04-13 22:24:46 +03:00
committed by Christian Brabandt
parent 4e3df44aa2
commit 5ecb452f5b
12 changed files with 25 additions and 17 deletions

View File

@@ -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.

View File

@@ -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 \

View File

@@ -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 \

View File

@@ -2,6 +2,7 @@
% START_INDENT
% INDENT_EXE let b:html_indent_line_limit = 64
<html>
<body>
<style>

View File

@@ -2,6 +2,7 @@
% START_INDENT
% INDENT_EXE let b:html_indent_line_limit = 64
<html>
<body>
<style>

View File

@@ -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,

View File

@@ -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,

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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