forked from aniani/vim
patch 8.2.0634: crash with null partial and blob
Problem: Crash with null partial and blob.
Solution: Check for NULL pointer. Add more tests. (Yegappan Lakshmanan,
closes #5984)
This commit is contained in:
@@ -142,6 +142,11 @@ func Test_get_func()
|
||||
call assert_equal({'func has': 'no dict'}, get(l:F, 'dict', {'func has': 'no dict'}))
|
||||
call assert_equal(0, get(l:F, 'dict'))
|
||||
call assert_equal([], get(l:F, 'args'))
|
||||
let NF = test_null_function()
|
||||
call assert_equal('', get(NF, 'name'))
|
||||
call assert_equal(NF, get(NF, 'func'))
|
||||
call assert_equal(0, get(NF, 'dict'))
|
||||
call assert_equal([], get(NF, 'args'))
|
||||
endfunc
|
||||
|
||||
" get({partial}, {what} [, {default}]) - in test_partial.vim
|
||||
|
||||
Reference in New Issue
Block a user