vim-patch:8.1.1765: get(func, dict, def) does not work properly

Problem:    get(func, dict, def) does not work properly.
Solution:   Handle NULL dict better. (Takuya Fujiwara, closes vim/vim#4734)
f91aac5e3e
This commit is contained in:
Jan Edmund Lazo
2019-07-28 16:07:37 -04:00
parent fe2ada7375
commit 98d389ce55
3 changed files with 59 additions and 3 deletions

View File

@@ -285,6 +285,11 @@ func Test_get_partial_items()
call assert_equal('MyDictFunc', get(Func, 'name'))
call assert_equal([], get(Func, 'args'))
call assert_true(empty( get(Func, 'dict')))
let P = function('substitute', ['hello there', 'there'])
let dict = {'partial has': 'no dict'}
call assert_equal(dict, get(P, 'dict', dict))
call assert_equal(0, get(l:P, 'dict'))
endfunc
func Test_compare_partials()