forked from aniani/vim
patch 8.2.3234: crash when printing long string with Lua
Problem: Crash when printing long string with Lua. Solution: Remove lua_pop(). (Martin Tournoij, closes #8648)
This commit is contained in:
@@ -850,6 +850,24 @@ func Test_luafile_error()
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
" Test :luafile printing a long string
|
||||
func Test_luafile_print()
|
||||
new Xlua_file
|
||||
let lines =<< trim END
|
||||
local data = ''
|
||||
for i = 1, 130 do
|
||||
data = data .. 'xxxxx asd as as dad sad sad xz cxz czxcxzczxc ad ad asd asd asd asd asd'
|
||||
end
|
||||
print(data)
|
||||
END
|
||||
call setline(1, lines)
|
||||
w
|
||||
luafile %
|
||||
|
||||
call delete('Xlua_file')
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
" Test for dealing with strings containing newlines and null character
|
||||
func Test_lua_string_with_newline()
|
||||
let x = execute('lua print("Hello\nWorld")')
|
||||
|
Reference in New Issue
Block a user