Mercurial > vim
diff src/testdir/test_eval_stuff.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 | 49694eceaa55 |
children | 3a94b984c9f9 |
line wrap: on
line diff
--- a/src/testdir/test_eval_stuff.vim +++ b/src/testdir/test_eval_stuff.vim @@ -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:')