aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-07 00:03:12 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-07 00:36:48 -0400
commit7ca5dc2519018c33def6bd6361d26099df04e7e2 (patch)
tree45f40d75baa2b2d18e645692616f4e71e3349b11 /src/nvim/testdir
parentfa1e740e60989134d5e6d623d687c1fd7c57909c (diff)
downloadrneovim-7ca5dc2519018c33def6bd6361d26099df04e7e2.tar.gz
rneovim-7ca5dc2519018c33def6bd6361d26099df04e7e2.tar.bz2
rneovim-7ca5dc2519018c33def6bd6361d26099df04e7e2.zip
vim-patch:8.1.1683: dictionary with string keys is longer than needed
Problem: Dictionary with string keys is longer than needed. Solution: Use *{key: val} for literaly keys. https://github.com/vim/vim/commit/d5abb4c87727eecb71b0e8ffdda60fc9598272f3 Vim's popup,textprop features are N/A. Neovim has not polyfilled their APIs. Skip docs and tests for these features.
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_listdict.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_listdict.vim b/src/nvim/testdir/test_listdict.vim
index bea62cb0ad..7b11885cc0 100644
--- a/src/nvim/testdir/test_listdict.vim
+++ b/src/nvim/testdir/test_listdict.vim
@@ -280,6 +280,10 @@ func Test_dict_func_remove_in_use()
call assert_equal(expected, d.func(string(remove(d, 'func'))))
endfunc
+func Test_dict_literal_keys()
+ call assert_equal({'one': 1, 'two2': 2, '3three': 3, '44': 4}, *{one: 1, two2: 2, 3three: 3, 44: 4},)
+endfunc
+
" Nasty: deepcopy() dict that refers to itself (fails when noref used)
func Test_dict_deepcopy()
let d = {1:1, 2:2}