diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-08-12 10:39:10 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-08-12 10:39:10 +0200 |
commit | 3e9c0b9608736e7d888f3141443f8754143364d7 (patch) | |
tree | 123097cacec39d41bb9a20b95a030ba8f2e787bb /src/testdir/test_listdict.vim | |
parent | 4f0884d6e24d1d45ec83fd86b372b403177d3298 (diff) | |
download | vim-git-3e9c0b9608736e7d888f3141443f8754143364d7.tar.gz |
patch 8.2.3333: Vim9: not enough tests run with Vim9v8.2.3333
Problem: Vim9: not enough tests run with Vim9.
Solution: Run a few more tests in Vim9 script and :def function.
Diffstat (limited to 'src/testdir/test_listdict.vim')
-rw-r--r-- | src/testdir/test_listdict.vim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/testdir/test_listdict.vim b/src/testdir/test_listdict.vim index 1e7c8125c..f9048724c 100644 --- a/src/testdir/test_listdict.vim +++ b/src/testdir/test_listdict.vim @@ -457,6 +457,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() |