diff options
author | Nikolai Aleksandrovich Pavlov <kp-pav@yandex.ru> | 2017-08-13 18:37:35 +0300 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-08-13 17:37:35 +0200 |
commit | bf1b1ea6eebf254ed975b743241a598c6aeeb132 (patch) | |
tree | 27c7a15fa1cef1dcee60dd7785bc23dceaf43b7b /test/functional/lua/overrides_spec.lua | |
parent | 1f9c139fd3a060924daf8ce1df32fc3204c6231d (diff) | |
download | rneovim-bf1b1ea6eebf254ed975b743241a598c6aeeb132.tar.gz rneovim-bf1b1ea6eebf254ed975b743241a598c6aeeb132.tar.bz2 rneovim-bf1b1ea6eebf254ed975b743241a598c6aeeb132.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.lua | 7 |
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() |