0
0
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:
Bram Moolenaar
2020-04-25 15:24:44 +02:00
parent 9d8d0b5c64
commit 92b83ccfda
20 changed files with 136 additions and 5 deletions

View File

@@ -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:')