Mercurial > vim
diff src/testdir/test_vim9_disassemble.vim @ 23156:6aa8ddf7a3fa v8.2.2124
patch 8.2.2124: Vim9: a range cannot be computed at runtime
Commit: https://github.com/vim/vim/commit/08597875b2a1e7d118b0346c652a96e7527e7d8b
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Dec 10 19:43:40 2020 +0100
patch 8.2.2124: Vim9: a range cannot be computed at runtime
Problem: Vim9: a range cannot be computed at runtime.
Solution: Add the ISN_RANGE instruction.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 10 Dec 2020 19:45:04 +0100 |
parents | 4b398a229b0b |
children | 4d5d12138b36 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_disassemble.vim +++ b/src/testdir/test_vim9_disassemble.vim @@ -133,6 +133,21 @@ def Test_disassemble_put_expr() res) enddef +def s:PutRange() + :$-2put a +enddef + +def Test_disassemble_put_range() + var res = execute('disass s:PutRange') + assert_match('<SNR>\d*_PutRange.*' .. + ' :$-2put a\_s*' .. + '\d RANGE $-2\_s*' .. + '\d PUT a range\_s*' .. + '\d PUSHNR 0\_s*' .. + '\d RETURN', + res) +enddef + def s:ScriptFuncPush() var localbool = true var localspec = v:none