diff src/testdir/vim9.vim @ 21733:1bb5adfe5966 v8.2.1416

patch 8.2.1416: Vim9: boolean evaluation does not work as intended Commit: https://github.com/vim/vim/commit/3e06a1e2a8c0854c881574f33363e00264db1f1d Author: Bram Moolenaar <Bram@vim.org> Date: Mon Aug 10 21:57:54 2020 +0200 patch 8.2.1416: Vim9: boolean evaluation does not work as intended Problem: Vim9: boolean evaluation does not work as intended. Solution: Use tv2bool() in Vim9 script. (closes https://github.com/vim/vim/issues/6681)
author Bram Moolenaar <Bram@vim.org>
date Mon, 10 Aug 2020 22:00:05 +0200
parents 489cb75c76b6
children 3e5d0832a2e7
line wrap: on
line diff
--- 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')