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:
parent
99a7c0d89c
commit
38f1ab31fa
@ -3006,4 +3006,44 @@ def Test_disassemble_defer()
|
|||||||
instr)
|
instr)
|
||||||
enddef
|
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
|
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
|
||||||
|
@ -695,6 +695,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1339,
|
||||||
/**/
|
/**/
|
||||||
1338,
|
1338,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user