mirror of
https://github.com/neovim/neovim.git
synced 2026-04-24 16:25:40 +00:00
lua/executor: Fix crash when printing empty string (#7157)
This commit is contained in:
committed by
Justin M. Keyes
parent
1f9c139fd3
commit
bf1b1ea6ee
@@ -69,6 +69,13 @@ describe('print', function()
|
||||
eq('\nT^@', redir_exec([[lua print("T\0")]]))
|
||||
eq('\nT\n', redir_exec([[lua print("T\n")]]))
|
||||
end)
|
||||
it('prints empty strings correctly', function()
|
||||
-- Regression: first test used to crash
|
||||
eq('', redir_exec('lua print("")'))
|
||||
eq('\n def', redir_exec('lua print("", "def")'))
|
||||
eq('\nabc ', redir_exec('lua print("abc", "")'))
|
||||
eq('\nabc def', redir_exec('lua print("abc", "", "def")'))
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('debug.debug', function()
|
||||
|
||||
Reference in New Issue
Block a user