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:
Michael Ennen
2016-05-10 22:22:56 -07:00
committed by James McCoy
parent 38d98bba68
commit b1c9d7d237
3 changed files with 20 additions and 4 deletions

View File

@@ -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}])