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:
@@ -41,6 +41,9 @@ func Test_mkdir_p()
|
||||
call assert_fails('call mkdir("Xfile", "p")', 'E739')
|
||||
call delete('Xfile')
|
||||
call delete('Xmkdir', 'rf')
|
||||
call assert_equal(0, mkdir(test_null_string()))
|
||||
call assert_fails('call mkdir([])', 'E730')
|
||||
call assert_fails('call mkdir("abc", [], [])', 'E745')
|
||||
endfunc
|
||||
|
||||
func Test_line_continuation()
|
||||
@@ -223,6 +226,7 @@ func Test_execute_cmd_with_null()
|
||||
call assert_fails('execute test_null_blob()', 'E976:')
|
||||
execute test_null_string()
|
||||
call assert_fails('execute test_null_partial()', 'E729:')
|
||||
call assert_fails('execute test_unknown()', 'E908:')
|
||||
if has('job')
|
||||
call assert_fails('execute test_null_job()', 'E908:')
|
||||
call assert_fails('execute test_null_channel()', 'E908:')
|
||||
|
||||
Reference in New Issue
Block a user