Mercurial > vim
diff src/testdir/test_vim9_disassemble.vim @ 19528:3b026343f398 v8.2.0321
patch 8.2.0321: Vim9: ":execute" does not work yet
Commit: https://github.com/vim/vim/commit/ad39c094d261109a695aba2c4f19fe336736cc55
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Feb 26 18:23:43 2020 +0100
patch 8.2.0321: Vim9: ":execute" does not work yet
Problem: Vim9: ":execute" does not work yet.
Solution: Add ISN_EXECUTE. (closes https://github.com/vim/vim/issues/5699) Also make :echo work with more
than one argument.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 26 Feb 2020 18:30:04 +0100 |
parents | 0d3dcb4476ba |
children | b8f778dda1a1 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_disassemble.vim +++ b/src/testdir/test_vim9_disassemble.vim @@ -690,4 +690,37 @@ def Test_disassemble_compare() " delete('Xdisassemble') enddef +def s:Execute() + execute 'help vim9.txt' + let cmd = 'help vim9.txt' + execute cmd + let tag = 'vim9.txt' + execute 'help ' .. tag +enddef + +def Test_disassemble_execute() + let res = execute('disass s:Execute') + assert_match('\<SNR>\d*_Execute.*' + \ .. "execute 'help vim9.txt'.*" + \ .. '\d PUSHS "help vim9.txt".*' + \ .. '\d EXECUTE 1.*' + \ .. "let cmd = 'help vim9.txt'.*" + \ .. '\d PUSHS "help vim9.txt".*' + \ .. '\d STORE $0.*' + \ .. 'execute cmd.*' + \ .. '\d LOAD $0.*' + \ .. '\d EXECUTE 1.*' + \ .. "let tag = 'vim9.txt'.*" + \ .. '\d PUSHS "vim9.txt".*' + \ .. '\d STORE $1.*' + \ .. "execute 'help ' .. tag.*" + \ .. '\d PUSHS "help ".*' + \ .. '\d LOAD $1.*' + \ .. '\d CONCAT.*' + \ .. '\d EXECUTE 1.*' + \ .. '\d PUSHNR 0.*' + \ .. '\d RETURN' + \, res) +enddef + " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker