Patch 8.2.2144
Problem: Vim9: some corner cases not tested.
Solution: Add a few tests.
Files: src/testdir/test_vim9_script.vim, src/testdir/test_vim9_cmd.vim
*** ../vim-8.2.2143/src/testdir/test_vim9_script.vim 2020-12-13
17:50:16.734956500 +0100
--- src/testdir/test_vim9_script.vim 2020-12-14 18:24:26.104352109 +0100
***************
*** 23,28 ****
--- 23,33 ----
list
assert_equal('three$', Screenline(&lines))
bwipe!
+
+ # won't generate anything
+ if false
+ :123
+ endif
enddef
let g:alist = [7]
***************
*** 1890,1895 ****
--- 1895,1903 ----
enddef
def Test_for_loop_fails()
+ CheckDefFailure(['for '], 'E1097:')
+ CheckDefFailure(['for x'], 'E1097:')
+ CheckDefFailure(['for x in'], 'E1097:')
CheckDefFailure(['for # in range(5)'], 'E690:')
CheckDefFailure(['for i In range(5)'], 'E690:')
CheckDefFailure(['var x = 5', 'for x in range(5)'], 'E1017:')
***************
*** 3054,3071 ****
delete('Xdef')
enddef
- def Test_put_with_linebreak()
- new
- var lines =<< trim END
- vim9script
- pu =split('abc', '\zs')
- ->join()
- END
- CheckScriptSuccess(lines)
- getline(2)->assert_equal('a b c')
- bwipe!
- enddef
-
def InvokeNormal()
exe "norm! :m+1\r"
enddef
--- 3062,3067 ----
*** ../vim-8.2.2143/src/testdir/test_vim9_cmd.vim 2020-12-10
19:43:36.629155311 +0100
--- src/testdir/test_vim9_cmd.vim 2020-12-14 18:29:43.003207450 +0100
***************
*** 20,25 ****
--- 20,28 ----
edit X`=filename`xx`=filenr`yy
assert_equal('XXtestxx77yy', bufname())
+
+ CheckDefFailure(['edit `=xxx`'], 'E1001:')
+ CheckDefFailure(['edit `="foo"'], 'E1083:')
enddef
def Test_hardcopy_wildcards()
***************
*** 626,631 ****
--- 629,648 ----
assert_equal('aaa', getline(4))
bwipe!
+
+ CheckDefFailure(['put =xxx'], 'E1001:')
+ enddef
+
+ def Test_put_with_linebreak()
+ new
+ var lines =<< trim END
+ vim9script
+ pu =split('abc', '\zs')
+ ->join()
+ END
+ CheckScriptSuccess(lines)
+ getline(2)->assert_equal('a b c')
+ bwipe!
enddef
def Test_command_star_range()
*** ../vim-8.2.2143/src/version.c 2020-12-13 21:26:51.565418479 +0100
--- src/version.c 2020-12-14 18:12:00.878944821 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2144,
/**/
--
Mushrooms always grow in damp places and so they look like umbrellas.
/// 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/202012141732.0BEHWCC4111584%40masaka.moolenaar.net.