1
0
forked from aniani/vim

patch 8.2.0619: null dict is not handled like an empty dict

Problem:    Null dict is not handled like an empty dict.
Solution:   Fix the code and add tests. (Yegappan Lakshmanan, closes #5968)
This commit is contained in:
Bram Moolenaar
2020-04-23 13:38:02 +02:00
parent db950e4c03
commit ea04a6e8ba
12 changed files with 128 additions and 27 deletions

View File

@@ -587,17 +587,17 @@ func Test_usercmd_custom()
return "a\nb\n"
endfunc
command -nargs=* -complete=customlist,T1 TCmd1
call feedkeys(":T1 \<C-A>\<C-B>\"\<CR>", 'xt')
call assert_equal('"T1 ', @:)
call feedkeys(":TCmd1 \<C-A>\<C-B>\"\<CR>", 'xt')
call assert_equal('"TCmd1 ', @:)
delcommand TCmd1
delfunc T1
func T2(a, c, p)
return ['a', 'b', 'c']
return {}
endfunc
command -nargs=* -complete=customlist,T2 TCmd2
call feedkeys(":T2 \<C-A>\<C-B>\"\<CR>", 'xt')
call assert_equal('"T2 ', @:)
call feedkeys(":TCmd2 \<C-A>\<C-B>\"\<CR>", 'xt')
call assert_equal('"TCmd2 ', @:)
delcommand TCmd2
delfunc T2
endfunc