Mercurial > vim
diff src/testdir/test_vim9_cmd.vim @ 23513:872239543313 v8.2.2299
patch 8.2.2299: Vim9: invalid memory access making error message flaky
Commit: https://github.com/vim/vim/commit/d1510ee9469f623c872a18b6e3c3666c0fb23c58
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jan 4 16:15:58 2021 +0100
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 https://github.com/vim/vim/issues/7467)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 04 Jan 2021 16:30:03 +0100 |
parents | 95db03521b01 |
children | 0ef920a03380 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_cmd.vim +++ b/src/testdir/test_vim9_cmd.vim @@ -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()