diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-10 21:57:54 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-10 21:57:54 +0200 |
commit | 3e06a1e2a8c0854c881574f33363e00264db1f1d (patch) | |
tree | 157355f93618af7809f52aa3bf2a83d0ce79867e /src/testdir/vim9.vim | |
parent | 6f8f7337c1211692d508239eb4cbc8a6f67de497 (diff) | |
download | vim-git-3e06a1e2a8c0854c881574f33363e00264db1f1d.tar.gz |
patch 8.2.1416: Vim9: boolean evaluation does not work as intendedv8.2.1416
Problem: Vim9: boolean evaluation does not work as intended.
Solution: Use tv2bool() in Vim9 script. (closes #6681)
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 fdad9f7c3..448aa3db9 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') |