diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-08-16 21:15:18 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-08-16 21:50:56 +0800 |
commit | 56befb6fb37afa14f28dc2f27157997c5280f560 (patch) | |
tree | 5ab2dd75b1f84a4e5c962aca66c81f4f233b659d | |
parent | e7801775060e2d8f9f20572fac687f438e81caa0 (diff) | |
download | rneovim-56befb6fb37afa14f28dc2f27157997c5280f560.tar.gz rneovim-56befb6fb37afa14f28dc2f27157997c5280f560.tar.bz2 rneovim-56befb6fb37afa14f28dc2f27157997c5280f560.zip |
vim-patch:8.2.3333: Vim9: not enough tests run with Vim9
Problem: Vim9: not enough tests run with Vim9.
Solution: Run a few more tests in Vim9 script and :def function.
https://github.com/vim/vim/commit/3e9c0b9608736e7d888f3141443f8754143364d7
Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r-- | test/old/testdir/test_listdict.vim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/old/testdir/test_listdict.vim b/test/old/testdir/test_listdict.vim index a33725cf5c..da4cde2f35 100644 --- a/test/old/testdir/test_listdict.vim +++ b/test/old/testdir/test_listdict.vim @@ -480,6 +480,19 @@ func Test_dict_func_remove_in_use() endfunc let expected = 'a:' . string(get(d, 'func')) call assert_equal(expected, d.func(string(remove(d, 'func')))) + + " similar, in a way it also works in Vim9 + let lines =<< trim END + VAR d = {1: 1, 2: 'x'} + func GetArg(a) + return "a:" .. a:a + endfunc + LET d.func = function('GetArg') + VAR expected = 'a:' .. string(get(d, 'func')) + call assert_equal(expected, d.func(string(remove(d, 'func')))) + END + call CheckTransLegacySuccess(lines) + call CheckTransVim9Success(lines) endfunc func Test_dict_literal_keys() |