diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-07-06 23:04:49 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-07-06 23:04:49 +0200 |
commit | 007f9d6ed597bd212acb95be9d0767c97d2a1438 (patch) | |
tree | b3a0391bd37c5251c457a3e199d9a772f2ebc80d /src/testdir/test_vim9_cmd.vim | |
parent | cbb6bdcd8967edc8ad123746d27ec30ccc7c1718 (diff) |
patch 8.2.1149: Vim9: :eval command not handled properlyv8.2.1149
Problem: Vim9: :eval command not handled properly.
Solution: Compile the :eval command. (closes #6408)
Diffstat (limited to 'src/testdir/test_vim9_cmd.vim')
-rw-r--r-- | src/testdir/test_vim9_cmd.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim index d7c01aae97..14af261713 100644 --- a/src/testdir/test_vim9_cmd.vim +++ b/src/testdir/test_vim9_cmd.vim @@ -248,5 +248,20 @@ def Test_bar_after_command() endif enddef +def Test_eval_command() + let from = 3 + let to = 5 + g:val = 111 + def Increment(nrs: list<number>) + for nr in nrs + g:val += nr + endfor + enddef + eval range(from, to) + ->Increment() + assert_equal(111 + 3 + 4 + 5, g:val) + unlet g:val +enddef + " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker |