mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-10 12:33:51 -05:00
@@ -2506,17 +2506,20 @@ endif
|
|||||||
" Function called for testing all functions defined here. These are
|
" Function called for testing all functions defined here. These are
|
||||||
" script-local, thus need to be executed here.
|
" script-local, thus need to be executed here.
|
||||||
" Returns a string with error messages (hopefully empty).
|
" Returns a string with error messages (hopefully empty).
|
||||||
func! TestFiletypeFuncs(testlist)
|
" Check if function exists first. See https://github.com/vim/vim/issues/9890
|
||||||
let output = ''
|
if !exists("*TestFiletypeFuncs")
|
||||||
for f in a:testlist
|
func! TestFiletypeFuncs(testlist)
|
||||||
try
|
let output = ''
|
||||||
exe f
|
for f in a:testlist
|
||||||
catch
|
try
|
||||||
let output = output . "\n" . f . ": " . v:exception
|
exe f
|
||||||
endtry
|
catch
|
||||||
endfor
|
let output = output . "\n" . f . ": " . v:exception
|
||||||
return output
|
endtry
|
||||||
endfunc
|
endfor
|
||||||
|
return output
|
||||||
|
endfunc
|
||||||
|
endif
|
||||||
|
|
||||||
" Restore 'cpoptions'
|
" Restore 'cpoptions'
|
||||||
let &cpo = s:cpo_save
|
let &cpo = s:cpo_save
|
||||||
|
|||||||
Reference in New Issue
Block a user