1
0
forked from aniani/vim
Doug Kearns 221c53202d
runtime(vim): Split Vim legacy and Vim9 script indent tests
The indent test file is not highlighted correctly as it's currently a
syntactically erroneous mix of legacy and Vim9 script.  This is causing
spurious indent test failures as the indent script relies on syntax ID
tests to determine the context of lines being processed.

Splitting the tests into legacy and Vim9 specific files allows for
correct syntax highlighting and indenting.

closes: #16431

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-13 07:54:33 +01:00

197 lines
2.4 KiB
Plaintext

" vim: set ft=vim sw=4 :
" START_INDENT
func Some()
let x = 1
endfunc
let cmd =
\ 'some '
\ 'string'
if 1
let x = [
\ ]
endif
for x in [
{key: 'value'},
]
eval 0
endfor
let t = [
\ {
\ 'k': 'val',
\ },
\ ]
def Func()
var d = dd
->extend({
})
eval 0
enddef
" END_INDENT
" START_INDENT
" INDENT_EXE let g:vim_indent_cont = 6
let cmd =
\ 'some '
\ 'string'
" END_INDENT
" START_INDENT
" INDENT_EXE let g:vim_indent_cont = 5
let list = [
\ 'one',
\ 'two']
" END_INDENT
" START_INDENT
" INDENT_EXE unlet g:vim_indent_cont
let list = [
'one',
'two',
]
echo
" END_INDENT
" START_INDENT
" INDENT_AT this-line
func Some()
let f = x " this-line
endfunc
" END_INDENT
" START_INDENT
" INDENT_NEXT next-line
func Some()
" next-line
let f = x
endfunc
" END_INDENT
" START_INDENT
" INDENT_PREV prev-line
func Some()
let f = x
" prev-line
endfunc
" END_INDENT
" START_INDENT
let a =<< END
nothing
END
" END_INDENT
" START_INDENT
let a =<< trim END
nothing
END
" END_INDENT
" START_INDENT
" INDENT_AT this-line
let a=<< trim END
blah
blah
blah this-line
END
" END_INDENT
" START_INDENT
if v:true
echo 0
end
" END_INDENT
" START_INDENT
augroup Name
autocmd!
augroup END
" END_INDENT
" START_INDENT
substitute/pat /rep /
echo
" END_INDENT
" START_INDENT
try
echo 1
catch /pat / # comment
echo 2
endtry
" END_INDENT
" START_INDENT
if end == 'xxx' || end == 'yyy'
echo
endif
" END_INDENT
" START_INDENT
nunmap <buffer> (
nunmap <buffer> )
inoremap [ {
inoremap ] }
silent! xunmap i{
silent! xunmap a{
" END_INDENT
" START_INDENT
make_job = job_start([&shell, &shellcmdflag, make_cmd], {
callback: function(MakeProcessOutput, [qfid]),
close_cb: function(MakeCloseCb, [qfid]),
exit_cb: MakeCompleted,
in_io: 'null'
})
" END_INDENT
" START_INDENT
setlocal iskeyword+=[
cword = expand('<cword>')
" END_INDENT
" START_INDENT
if winsz == 0|let winsz= ""|endif
exe "noswapfile ".winsz."wincmd s"
" END_INDENT
" START_INDENT
function Func()
if v:true
+
echo
-
endif
endfunction
" END_INDENT
" START_INDENT
silent! argdel *
edit file
" END_INDENT
" START_INDENT
call prop_type_add('indent_after_literal_dict', #{ foo: 'bar' })
call prop_type_delete('indent_after_literal_dict')
" END_INDENT
" START_INDENT
silent function Foo()
return 42
endfunction
silent! function Bar()
return 42
endfunction
" END_INDENT