Patch 8.2.0292

11 views
Skip to first unread message

Bram Moolenaar

unread,
Feb 20, 2020, 5:09:15 PM2/20/20
to vim...@googlegroups.com

Patch 8.2.0292
Problem: Vim9: CHECKNR and CHECKTYPE instructions not tested.
Solution: Add tests.
Files: src/testdir/test_vim9_expr.vim, src/testdir/test_vim9_script.vim


*** ../vim-8.2.0291/src/testdir/test_vim9_expr.vim 2020-02-20 22:14:27.249201378 +0100
--- src/testdir/test_vim9_expr.vim 2020-02-20 23:02:33.368053055 +0100
***************
*** 781,786 ****
--- 781,791 ----

call CheckDefExecFailure("echo s:doesnt_exist", 'E121:')
call CheckDefExecFailure("echo g:doesnt_exist", 'E121:')
+
+ call CheckDefExecFailure("let x = +g:astring", 'E1030:')
+ call CheckDefExecFailure("let x = +g:ablob", 'E974:')
+ call CheckDefExecFailure("let x = +g:alist", 'E745:')
+ call CheckDefExecFailure("let x = +g:adict", 'E728:')
endfunc

let g:Funcrefs = [function('add')]
*** ../vim-8.2.0291/src/testdir/test_vim9_script.vim 2020-02-20 22:54:39.609505358 +0100
--- src/testdir/test_vim9_script.vim 2020-02-20 23:07:12.703192019 +0100
***************
*** 114,122 ****
--- 114,129 ----
return 123
enddef

+ let g:notNumber = 'string'
+
+ def ReturnGlobal(): number
+ return g:notNumber
+ enddef
+
def Test_return_string()
assert_equal('string', ReturnString())
assert_equal(123, ReturnNumber())
+ assert_fails('call ReturnGlobal()', 'E1029: Expected number but got string')
enddef

func Increment()
*** ../vim-8.2.0291/src/version.c 2020-02-20 22:54:39.609505358 +0100
--- src/version.c 2020-02-20 23:07:51.587072010 +0100
***************
*** 740,741 ****
--- 740,743 ----
{ /* Add new patch number below this line */
+ /**/
+ 292,
/**/

--
I AM THANKFUL...
...for a lawn that needs mowing, windows that need cleaning
and gutters that need fixing because it means I have a home.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages