diff options
author | Michael Ennen <mike.ennen@gmail.com> | 2016-05-10 22:22:56 -0700 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2016-06-09 21:18:09 -0400 |
commit | b1c9d7d2379c91e16fca461f983e2014c720ab8a (patch) | |
tree | dd105471752b77b8c6fd875b9b3b2c738d5b5b01 /test/functional/legacy/assert_spec.lua | |
parent | 38d98bba6808fcdd97717d1ce0d4df3589cb9ff7 (diff) | |
download | rneovim-b1c9d7d2379c91e16fca461f983e2014c720ab8a.tar.gz rneovim-b1c9d7d2379c91e16fca461f983e2014c720ab8a.tar.bz2 rneovim-b1c9d7d2379c91e16fca461f983e2014c720ab8a.zip |
vim-patch:7.4.1223
Problem: Crash when setting v:errors to a number.
Solution: Free the typval without assuming its type. (Yasuhiro Matsumoto)
https://github.com/vim/vim/commit/a542c680a8b42cb766e64d4ee7374ef4dacb7832
Diffstat (limited to 'test/functional/legacy/assert_spec.lua')
-rw-r--r-- | test/functional/legacy/assert_spec.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/legacy/assert_spec.lua b/test/functional/legacy/assert_spec.lua index 63699387c1..ab6be0ecb7 100644 --- a/test/functional/legacy/assert_spec.lua +++ b/test/functional/legacy/assert_spec.lua @@ -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}]) |