Mercurial > vim
comparison src/testdir/test_vim9_script.vim @ 27237:44cb142c8615 v8.2.4147
patch 8.2.4147: E464 does not always include the offending command
Commit: https://github.com/vim/vim/commit/bed34f0a8a4e38a72a080184881bc68254a8cdc6
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jan 19 20:48:37 2022 +0000
patch 8.2.4147: E464 does not always include the offending command
Problem: E464 does not always include the offending command.
Solution: Add another error message with "%s". (closes https://github.com/vim/vim/issues/9564)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 19 Jan 2022 22:00:03 +0100 |
parents | 6fc63c6a7ee7 |
children | 4c16acb2525f |
comparison
equal
deleted
inserted
replaced
27236:6cf6cf88dc33 | 27237:44cb142c8615 |
---|---|
3662 return x | 3662 return x |
3663 enddef | 3663 enddef |
3664 Nested() | 3664 Nested() |
3665 enddef | 3665 enddef |
3666 | 3666 |
3667 def Test_ambigous_command_error() | |
3668 var lines =<< trim END | |
3669 vim9script | |
3670 command CmdA echomsg 'CmdA' | |
3671 command CmdB echomsg 'CmdB' | |
3672 Cmd | |
3673 END | |
3674 CheckScriptFailure(lines, 'E464: Ambiguous use of user-defined command: Cmd', 4) | |
3675 | |
3676 lines =<< trim END | |
3677 vim9script | |
3678 def Func() | |
3679 Cmd | |
3680 enddef | |
3681 Func() | |
3682 END | |
3683 CheckScriptFailure(lines, 'E464: Ambiguous use of user-defined command: Cmd', 1) | |
3684 | |
3685 lines =<< trim END | |
3686 vim9script | |
3687 nnoremap <F3> <ScriptCmd>Cmd<CR> | |
3688 feedkeys("\<F3>", 'xt') | |
3689 END | |
3690 CheckScriptFailure(lines, 'E464: Ambiguous use of user-defined command: Cmd', 3) | |
3691 | |
3692 delcommand CmdA | |
3693 delcommand CmdB | |
3694 nunmap <F3> | |
3695 enddef | |
3696 | |
3667 " Execute this near the end, profiling doesn't stop until Vim exits. | 3697 " Execute this near the end, profiling doesn't stop until Vim exits. |
3668 " This only tests that it works, not the profiling output. | 3698 " This only tests that it works, not the profiling output. |
3669 def Test_xx_profile_with_lambda() | 3699 def Test_xx_profile_with_lambda() |
3670 CheckFeature profile | 3700 CheckFeature profile |
3671 | 3701 |