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

patch 8.2.2299: Vim9: invalid memory access making error message flaky

Problem:    Vim9: invalid memory access making error message flaky.
Solution:   Do not check cmd_argt for CMD_USER. (issue #7467)
This commit is contained in:
Bram Moolenaar
2021-01-04 16:15:58 +01:00
parent cef1270dec
commit d1510ee946
6 changed files with 40 additions and 6 deletions

View File

@@ -771,6 +771,24 @@ def Test_f_args()
CheckScriptSuccess(lines)
enddef
def Test_user_command_comment()
command -nargs=1 Comd echom <q-args>
var lines =<< trim END
vim9script
Comd # comment
END
CheckScriptSuccess(lines)
lines =<< trim END
vim9script
Comd# comment
END
CheckScriptFailure(lines, 'E1144:')
delcommand Comd
enddef
def Test_star_command()
var lines =<< trim END
vim9script
@@ -798,12 +816,14 @@ def Test_cmd_argument_without_colon()
enddef
def Test_ambiguous_user_cmd()
command Cmd1 eval 0
command Cmd2 eval 0
var lines =<< trim END
com Cmd1 eval 0
com Cmd2 eval 0
Cmd
END
CheckScriptFailure(lines, 'E464:')
CheckDefAndScriptFailure(lines, 'E464:', 1)
delcommand Cmd1
delcommand Cmd2
enddef
def Test_command_not_recognized()