patch 8.2.1149: Vim9: :eval command not handled properly
Problem: Vim9: :eval command not handled properly.
Solution: Compile the :eval command. (closes #6408)
diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim
index d7c01aa..14af261 100644
--- a/src/testdir/test_vim9_cmd.vim
+++ b/src/testdir/test_vim9_cmd.vim
@@ -248,5 +248,20 @@
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