executor: Fix some memory leaks

This commit is contained in:
ZyX
2017-01-29 19:32:01 +03:00
parent e1bbaca7ac
commit 295e7607c4
3 changed files with 21 additions and 1 deletions

View File

@ -243,10 +243,11 @@ describe('luaeval()', function()
exc_exec([[call luaeval("error('ERROR')")]]))
end)
it('does not leak memory when called with too long line with syntax error',
it('does not leak memory when called with too long line',
function()
local s = ('x'):rep(65536)
eq('Vim(call):E5107: Error while creating lua chunk for luaeval(): [string "<VimL compiled string>"]:1: unexpected symbol near \')\'',
exc_exec([[call luaeval("(']] .. s ..[[' + )")]]))
eq(s, funcs.luaeval('"' .. s .. '"'))
end)
end)