aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/old/testdir/test_listdict.vim13
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()