aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/overrides_spec.lua
diff options
context:
space:
mode:
authorNikolai Aleksandrovich Pavlov <kp-pav@yandex.ru>2017-08-13 18:37:35 +0300
committerckelsel <ckelsel@hotmail.com>2017-08-14 07:45:50 +0800
commitd0cb175cab56da47fbd08e4b65ca02832a93bc38 (patch)
treeabe9a99bbc1960674b421a5ff034a46ae86f722d /test/functional/lua/overrides_spec.lua
parente6c528d9fc527d555a85ae12dc6cc8b74ab09e38 (diff)
downloadrneovim-d0cb175cab56da47fbd08e4b65ca02832a93bc38.tar.gz
rneovim-d0cb175cab56da47fbd08e4b65ca02832a93bc38.tar.bz2
rneovim-d0cb175cab56da47fbd08e4b65ca02832a93bc38.zip
lua/executor: Fix crash when printing empty string (#7157)
Diffstat (limited to 'test/functional/lua/overrides_spec.lua')
-rw-r--r--test/functional/lua/overrides_spec.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/lua/overrides_spec.lua b/test/functional/lua/overrides_spec.lua
index 6e1d50071d..8ca5fe57ba 100644
--- a/test/functional/lua/overrides_spec.lua
+++ b/test/functional/lua/overrides_spec.lua
@@ -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()