comparison src/testdir/test_vim9_script.vim @ 27768:b081ba78675a v8.2.4410

patch 8.2.4410: Vim9: some code not covered by tests Commit: https://github.com/vim/vim/commit/0c7f2610de94b42ce111c4839ba37505720181d4 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Feb 17 19:44:07 2022 +0000 patch 8.2.4410: Vim9: some code not covered by tests Problem: Vim9: some code not covered by tests. Solution: Add a few more tests. Remove dead code.
author Bram Moolenaar <Bram@vim.org>
date Thu, 17 Feb 2022 20:45:03 +0100
parents fae9567b8024
children f57b8db06f26
comparison
equal deleted inserted replaced
27767:e66f1e40d8a8 27768:b081ba78675a
49 assert_equal('three$', g:Screenline(&lines)) 49 assert_equal('three$', g:Screenline(&lines))
50 END 50 END
51 v9.CheckScriptSuccess(lines) 51 v9.CheckScriptSuccess(lines)
52 52
53 bwipe! 53 bwipe!
54
55 lines =<< trim END
56 set cpo+=-
57 :1,999
58 END
59 v9.CheckDefExecAndScriptFailure(lines, 'E16:', 2)
60 set cpo&vim
61
62 v9.CheckDefExecAndScriptFailure([":'x"], 'E20:', 1)
54 63
55 # won't generate anything 64 # won't generate anything
56 if false 65 if false
57 :123 66 :123
58 endif 67 endif
1724 assert_match('^\[1, 2, 3\] {''a'': 1, ''b'': 2}$', g:Screenline(&lines)) 1733 assert_match('^\[1, 2, 3\] {''a'': 1, ''b'': 2}$', g:Screenline(&lines))
1725 1734
1726 v9.CheckDefFailure(['execute xxx'], 'E1001:', 1) 1735 v9.CheckDefFailure(['execute xxx'], 'E1001:', 1)
1727 v9.CheckDefExecFailure(['execute "tabnext " .. 8'], 'E475:', 1) 1736 v9.CheckDefExecFailure(['execute "tabnext " .. 8'], 'E475:', 1)
1728 v9.CheckDefFailure(['execute "cmd"# comment'], 'E488:', 1) 1737 v9.CheckDefFailure(['execute "cmd"# comment'], 'E488:', 1)
1738 if has('channel')
1739 v9.CheckDefExecFailure(['execute test_null_channel()'], 'E908:', 1)
1740 endif
1729 enddef 1741 enddef
1730 1742
1731 def Test_execute_cmd_vimscript() 1743 def Test_execute_cmd_vimscript()
1732 # only checks line continuation 1744 # only checks line continuation
1733 var lines =<< trim END 1745 var lines =<< trim END