0
0
mirror of https://github.com/vim/vim.git synced 2025-10-03 05:14:07 -04:00

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.
This commit is contained in:
Bram Moolenaar
2022-02-17 19:44:07 +00:00
parent 6296d1e60e
commit 0c7f2610de
6 changed files with 55 additions and 32 deletions

View File

@@ -52,6 +52,15 @@ def Test_range_only()
bwipe!
lines =<< trim END
set cpo+=-
:1,999
END
v9.CheckDefExecAndScriptFailure(lines, 'E16:', 2)
set cpo&vim
v9.CheckDefExecAndScriptFailure([":'x"], 'E20:', 1)
# won't generate anything
if false
:123
@@ -1726,6 +1735,9 @@ def Test_execute_cmd()
v9.CheckDefFailure(['execute xxx'], 'E1001:', 1)
v9.CheckDefExecFailure(['execute "tabnext " .. 8'], 'E475:', 1)
v9.CheckDefFailure(['execute "cmd"# comment'], 'E488:', 1)
if has('channel')
v9.CheckDefExecFailure(['execute test_null_channel()'], 'E908:', 1)
endif
enddef
def Test_execute_cmd_vimscript()