comparison src/testdir/test_getvar.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 3856047f2211
children 08940efa6b4e
comparison
equal deleted inserted replaced
20157:ada5332a22b7 20158:94f05de75e9f
140 call assert_equal('tr', get(l:F, 'name')) 140 call assert_equal('tr', get(l:F, 'name'))
141 call assert_equal(l:F, get(l:F, 'func')) 141 call assert_equal(l:F, get(l:F, 'func'))
142 call assert_equal({'func has': 'no dict'}, get(l:F, 'dict', {'func has': 'no dict'})) 142 call assert_equal({'func has': 'no dict'}, get(l:F, 'dict', {'func has': 'no dict'}))
143 call assert_equal(0, get(l:F, 'dict')) 143 call assert_equal(0, get(l:F, 'dict'))
144 call assert_equal([], get(l:F, 'args')) 144 call assert_equal([], get(l:F, 'args'))
145 let NF = test_null_function()
146 call assert_equal('', get(NF, 'name'))
147 call assert_equal(NF, get(NF, 'func'))
148 call assert_equal(0, get(NF, 'dict'))
149 call assert_equal([], get(NF, 'args'))
145 endfunc 150 endfunc
146 151
147 " get({partial}, {what} [, {default}]) - in test_partial.vim 152 " get({partial}, {what} [, {default}]) - in test_partial.vim