diff options
Diffstat (limited to 'src/testdir/test_vim9_disassemble.vim')
-rw-r--r-- | src/testdir/test_vim9_disassemble.vim | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_disassemble.vim b/src/testdir/test_vim9_disassemble.vim index 98a9e207e5..ea012b744e 100644 --- a/src/testdir/test_vim9_disassemble.vim +++ b/src/testdir/test_vim9_disassemble.vim @@ -699,6 +699,24 @@ def Test_disassemble_lambda() instr) enddef +def NestedOuter() + def g:Inner() + echomsg "inner" + enddef +enddef + +def Test_nested_func() + let instr = execute('disassemble NestedOuter') + assert_match('NestedOuter\_s*' .. + 'def g:Inner()\_s*' .. + 'echomsg "inner"\_s*' .. + 'enddef\_s*' .. + '\d NEWFUNC <lambda>\d\+ Inner\_s*' .. + '\d PUSHNR 0\_s*' .. + '\d RETURN', + instr) +enddef + def AndOr(arg: any): string if arg == 1 && arg != 2 || arg == 4 return 'yes' |