mirror of
https://github.com/vim/vim.git
synced 2025-10-04 05:25:06 -04:00
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:
@@ -1164,6 +1164,18 @@ func Test_type()
|
||||
call assert_equal(v:t_bool, type(v:true))
|
||||
call assert_equal(v:t_none, type(v:none))
|
||||
call assert_equal(v:t_none, type(v:null))
|
||||
call assert_equal(v:t_string, type(test_null_string()))
|
||||
call assert_equal(v:t_func, type(test_null_function()))
|
||||
call assert_equal(v:t_func, type(test_null_partial()))
|
||||
call assert_equal(v:t_list, type(test_null_list()))
|
||||
call assert_equal(v:t_dict, type(test_null_dict()))
|
||||
if has('job')
|
||||
call assert_equal(v:t_job, type(test_null_job()))
|
||||
endif
|
||||
if has('channel')
|
||||
call assert_equal(v:t_channel, type(test_null_channel()))
|
||||
endif
|
||||
call assert_equal(v:t_blob, type(test_null_blob()))
|
||||
|
||||
call assert_fails("call type(test_void())", 'E685:')
|
||||
call assert_fails("call type(test_unknown())", 'E685:')
|
||||
|
Reference in New Issue
Block a user