Mercurial > vim
diff src/testdir/test_vimscript.vim @ 20158:94f05de75e9f v8.2.0634
patch 8.2.0634: crash with null partial and blob
Commit: https://github.com/vim/vim/commit/92b83ccfda7a1d654ccaaf161a9c8a8e01fbcf76
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 25 15:24:44 2020 +0200
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 25 Apr 2020 15:30:04 +0200 |
parents | 0b35a7ffceb2 |
children | 116c7bd5e980 |
line wrap: on
line diff
--- a/src/testdir/test_vimscript.vim +++ b/src/testdir/test_vimscript.vim @@ -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:')