diff options
Diffstat (limited to 'src/testdir/test_vim9_disassemble.vim')
-rw-r--r-- | src/testdir/test_vim9_disassemble.vim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_disassemble.vim b/src/testdir/test_vim9_disassemble.vim index e6b3751452..8a96bf2732 100644 --- a/src/testdir/test_vim9_disassemble.vim +++ b/src/testdir/test_vim9_disassemble.vim @@ -121,6 +121,25 @@ def Test_disassemble_exec_expr() res) enddef +def s:Substitute() + var expr = "abc" + :%s/a/\=expr/&g#c +enddef + +def Test_disassemble_substitute() + var res = execute('disass s:Substitute') + assert_match('<SNR>\d*_Substitute.*' .. + ' var expr = "abc"\_s*' .. + '\d PUSHS "abc"\_s*' .. + '\d STORE $0\_s*' .. + ' :%s/a/\\=expr/&g#c\_s*' .. + '\d SUBSTITUTE :%s/a/\\=expr/&g#c\_s*' .. + ' 0 LOAD $0\_s*' .. + ' -------------\_s*' .. + '\d RETURN 0', + res) +enddef + def s:YankRange() norm! m[jjm] :'[,']yank |