From 666d85d3ce80c19c9cd2acd156edbf50fd7e8741 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sat, 21 Jan 2017 01:52:19 +0300 Subject: functests: Some more tests --- test/functional/lua/luaeval_spec.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/functional/lua/luaeval_spec.lua') diff --git a/test/functional/lua/luaeval_spec.lua b/test/functional/lua/luaeval_spec.lua index 345848cfff..b0169c3d6b 100644 --- a/test/functional/lua/luaeval_spec.lua +++ b/test/functional/lua/luaeval_spec.lua @@ -241,4 +241,11 @@ describe('luaeval()', function() eq('Vim(call):E5108: Error while calling lua chunk for luaeval(): [string ""]:1: ERROR', exc_exec([[call luaeval("error('ERROR')")]])) end) + + it('does not leak memory when called with too long line with syntax error', + function() + local s = ('x'):rep(65536) + eq('Vim(call):E5107: Error while creating lua chunk for luaeval(): [string ""]:1: unexpected symbol near \')\'', + exc_exec([[call luaeval("(']] .. s ..[[' + )")]])) + end) end) -- cgit