mirror of
https://github.com/vim/vim.git
synced 2025-10-03 05:14:07 -04:00
patch 7.4.1847
Problem: Getting an item from a NULL dict crashes. Setting a register to a NULL list crashes. (Nikolai Pavlov, issue #768) Comparing a NULL dict with a NULL dict fails. Solution: Properly check for NULL.
This commit is contained in:
@@ -90,3 +90,14 @@ func Test_loop_over_null_list()
|
||||
call assert_true(0, 'should not get here')
|
||||
endfor
|
||||
endfunc
|
||||
|
||||
func Test_compare_null_dict()
|
||||
call assert_fails('let x = test_null_dict()[10]')
|
||||
call assert_equal({}, {})
|
||||
call assert_equal(test_null_dict(), test_null_dict())
|
||||
call assert_notequal({}, test_null_dict())
|
||||
endfunc
|
||||
|
||||
func Test_set_reg_null_list()
|
||||
call setreg('x', test_null_list())
|
||||
endfunc
|
||||
|
Reference in New Issue
Block a user