1
0
forked from aniani/vim

patch 8.2.4989: cannot specify a function name for :defcompile

Problem:    Cannot specify a function name for :defcompile.
Solution:   Implement a function name argument for :defcompile.
This commit is contained in:
Bram Moolenaar
2022-05-21 15:39:02 +01:00
parent 2d8ed0203a
commit f79d9dd43f
8 changed files with 127 additions and 65 deletions

View File

@@ -83,6 +83,16 @@ def Test_vim9cmd()
v9.CheckScriptSuccess(lines)
enddef
def Test_defcompile_fails()
assert_fails('defcompile NotExists', 'E1061:')
assert_fails('defcompile debug debug Test_defcompile_fails', 'E488:')
assert_fails('defcompile profile profile Test_defcompile_fails', 'E488:')
enddef
defcompile Test_defcompile_fails
defcompile debug Test_defcompile_fails
defcompile profile Test_defcompile_fails
def Test_cmdmod_execute()
# "legacy" applies not only to the "exe" argument but also to the commands
var lines =<< trim END

View File

@@ -43,6 +43,9 @@ def Test_disassemble_load()
assert_fails('disass [', 'E475:')
assert_fails('disass 234', 'E129:')
assert_fails('disass <XX>foo', 'E129:')
assert_fails('disass Test_disassemble_load burp', 'E488:')
assert_fails('disass debug debug Test_disassemble_load', 'E488:')
assert_fails('disass profile profile Test_disassemble_load', 'E488:')
var res = execute('disass s:ScriptFuncLoad')
assert_match('<SNR>\d*_ScriptFuncLoad.*' ..