comparison src/testdir/test_lua.vim @ 25394:3a8b61b31724 v8.2.3234

patch 8.2.3234: crash when printing long string with Lua Commit: https://github.com/vim/vim/commit/78e006b9b02fac94c910445d842f6dc5331fa57a Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jul 28 15:07:01 2021 +0200 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 https://github.com/vim/vim/issues/8648)
author Bram Moolenaar <Bram@vim.org>
date Wed, 28 Jul 2021 15:15:04 +0200
parents 0878f0fd349b
children 241d26b17192
comparison
equal deleted inserted replaced
25393:6fe0a85534b8 25394:3a8b61b31724
843 new Xlua_file 843 new Xlua_file
844 call writefile(['nil = 0' ], 'Xlua_file') 844 call writefile(['nil = 0' ], 'Xlua_file')
845 call setfperm('Xlua_file', 'r-xr-xr-x') 845 call setfperm('Xlua_file', 'r-xr-xr-x')
846 846
847 call assert_fails('luafile Xlua_file', "Xlua_file:1: unexpected symbol near 'nil'") 847 call assert_fails('luafile Xlua_file', "Xlua_file:1: unexpected symbol near 'nil'")
848
849 call delete('Xlua_file')
850 bwipe!
851 endfunc
852
853 " Test :luafile printing a long string
854 func Test_luafile_print()
855 new Xlua_file
856 let lines =<< trim END
857 local data = ''
858 for i = 1, 130 do
859 data = data .. 'xxxxx asd as as dad sad sad xz cxz czxcxzczxc ad ad asd asd asd asd asd'
860 end
861 print(data)
862 END
863 call setline(1, lines)
864 w
865 luafile %
848 866
849 call delete('Xlua_file') 867 call delete('Xlua_file')
850 bwipe! 868 bwipe!
851 endfunc 869 endfunc
852 870