0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 9.0.1339: no test for :disassemble with class function

Problem:    No test for :disassemble with class function.
Solution:   Add a test.
This commit is contained in:
Bram Moolenaar 2023-02-21 20:09:46 +00:00
parent 99a7c0d89c
commit 38f1ab31fa
2 changed files with 42 additions and 0 deletions

View File

@ -3006,4 +3006,44 @@ def Test_disassemble_defer()
instr)
enddef
def Test_disassemble_class_function()
var lines =<< trim END
vim9script
class Cl
static def Fc(): string
return "x"
enddef
endclass
g:instr = execute('disassemble Cl.Fc')
END
v9.CheckScriptSuccess(lines)
assert_match('Fc\_s*' ..
'return "x"\_s*' ..
'\d PUSHS "x"\_s*' ..
'\d RETURN\_s*',
g:instr)
lines =<< trim END
vim9script
class Cl
def Fo(): string
return "y"
enddef
endclass
g:instr = execute('disassemble Cl.Fo')
END
v9.CheckScriptSuccess(lines)
assert_match('Fo\_s*' ..
'return "y"\_s*' ..
'\d PUSHS "y"\_s*' ..
'\d RETURN\_s*',
g:instr)
unlet g:instr
enddef
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker

View File

@ -695,6 +695,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1339,
/**/
1338,
/**/