Mercurial > vim
diff src/testdir/test_vim9_disassemble.vim @ 21399:5cb6e676defd v8.2.1250
patch 8.2.1250: Vim9: cannot use the g:, b:, t: and w: namespaces
Commit: https://github.com/vim/vim/commit/2f8ce0ae8a8247563be0a77a308130e767e0566e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 19 19:47:35 2020 +0200
patch 8.2.1250: Vim9: cannot use the g:, b:, t: and w: namespaces
Problem: Vim9: cannot use the g:, b:, t: and w: namespaces.
Solution: Add instructions to push a dict for the namespaces. (closes https://github.com/vim/vim/issues/6480)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 19 Jul 2020 20:00:04 +0200 |
parents | 62339482daab |
children | 1c4d4aa22b37 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_disassemble.vim +++ b/src/testdir/test_vim9_disassemble.vim @@ -21,9 +21,13 @@ def s:ScriptFuncLoad(arg: string) echo v:version echo s:scriptvar echo g:globalvar + echo get(g:, "global") echo b:buffervar + echo get(b:, "buffer") echo w:windowvar + echo get(w:, "window") echo t:tabpagevar + echo get(t:, "tab") echo &tabstop echo $ENVVAR echo @z @@ -47,9 +51,25 @@ def Test_disassemble_load() ' LOADV v:version.*' .. ' LOADS s:scriptvar from .*test_vim9_disassemble.vim.*' .. ' LOADG g:globalvar.*' .. + 'echo get(g:, "global")\_s*' .. + '\d\+ LOAD g:\_s*' .. + '\d\+ PUSHS "global"\_s*' .. + '\d\+ BCALL get(argc 2).*' .. ' LOADB b:buffervar.*' .. + 'echo get(b:, "buffer")\_s*' .. + '\d\+ LOAD b:\_s*' .. + '\d\+ PUSHS "buffer"\_s*' .. + '\d\+ BCALL get(argc 2).*' .. ' LOADW w:windowvar.*' .. + 'echo get(w:, "window")\_s*' .. + '\d\+ LOAD w:\_s*' .. + '\d\+ PUSHS "window"\_s*' .. + '\d\+ BCALL get(argc 2).*' .. ' LOADT t:tabpagevar.*' .. + 'echo get(t:, "tab")\_s*' .. + '\d\+ LOAD t:\_s*' .. + '\d\+ PUSHS "tab"\_s*' .. + '\d\+ BCALL get(argc 2).*' .. ' LOADENV $ENVVAR.*' .. ' LOADREG @z.*', res)