diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-02-15 21:17:56 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-02-15 21:17:56 +0000 |
commit | 8b716f5f2204f938769de283d43bcb2f77d403e7 (patch) | |
tree | b6e02ebcc3d6b23646b037e9b145b1aa147be8b1 /src/testdir/test_vim9_cmd.vim | |
parent | 9fdde7992ab4c21517f447ca3d651b9ff4a770e8 (diff) |
patch 8.2.4395: some code lines not covered by testsv8.2.4395
Problem: Some code lines not covered by tests.
Solution: Add a few more test cases. Fix getting more than one error for
invalid assignment.
Diffstat (limited to 'src/testdir/test_vim9_cmd.vim')
-rw-r--r-- | src/testdir/test_vim9_cmd.vim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim index f80d5a26d1..10be6910af 100644 --- a/src/testdir/test_vim9_cmd.vim +++ b/src/testdir/test_vim9_cmd.vim @@ -1355,6 +1355,13 @@ def Test_command_not_recognized() v9.CheckDefFailure(lines, 'E1146:', 1) lines =<< trim END + if 0 + d.key = 'asdf' + endif + END + v9.CheckDefSuccess(lines) + + lines =<< trim END d['key'] = 'asdf' END v9.CheckDefFailure(lines, 'E1146:', 1) @@ -1621,6 +1628,11 @@ def Test_substitute_expr() s/text/\=['aaa', 'bbb', 'ccc']/ assert_equal(['some aaa', 'bbb', 'ccc', ' here'], getline(1, '$')) bwipe! + + # inside "if 0" substitute is ignored + if 0 + s/a/\=nothing/ and | some more + endif enddef def Test_redir_to_var() @@ -1664,6 +1676,12 @@ def Test_redir_to_var() v9.CheckDefFailure(lines, 'E1089:') lines =<< trim END + var text: string + redir => text + END + v9.CheckDefFailure(lines, 'E1185:') + + lines =<< trim END var ls = 'asdf' redir => ls[1] redir END |