diff options
Diffstat (limited to 'src/testdir/vim9.vim')
-rw-r--r-- | src/testdir/vim9.vim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/testdir/vim9.vim b/src/testdir/vim9.vim index fdad9f7c3a..448aa3db94 100644 --- a/src/testdir/vim9.vim +++ b/src/testdir/vim9.vim @@ -1,5 +1,13 @@ " Utility functions for testing vim9 script +" Check that "lines" inside ":def" has no error. +func CheckDefSuccess(lines) + call writefile(['def Func()'] + a:lines + ['enddef', 'defcompile'], 'Xdef') + so Xdef + call Func() + call delete('Xdef') +endfunc + " Check that "lines" inside ":def" results in an "error" message. func CheckDefFailure(lines, error) call writefile(['def Func()'] + a:lines + ['enddef', 'defcompile'], 'Xdef') |