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 -- [email protected] -- 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 ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202002202209.01KM98Cm009366%40masaka.moolenaar.net.