mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 17:21:49 +00:00
vim-patch:7.4.1223
Problem: Crash when setting v:errors to a number.
Solution: Free the typval without assuming its type. (Yasuhiro Matsumoto)
a542c680a8
This commit is contained in:

committed by
James McCoy

parent
38d98bba68
commit
b1c9d7d237
@@ -141,6 +141,18 @@ describe('assert function:', function()
|
||||
tmpname_two .. " line 1: 'file two'",
|
||||
})
|
||||
end)
|
||||
|
||||
it('is reset to a list by assert functions', function()
|
||||
source([[
|
||||
let save_verrors = v:errors
|
||||
let v:['errors'] = {'foo': 3}
|
||||
call assert_equal('yes', 'no')
|
||||
let verrors = v:errors
|
||||
let v:errors = save_verrors
|
||||
call assert_equal(type([]), type(verrors))
|
||||
]])
|
||||
expected_empty()
|
||||
end)
|
||||
end)
|
||||
|
||||
-- assert_fails({cmd}, [, {error}])
|
||||
|
Reference in New Issue
Block a user