diff options
author | James McCoy <jamessan@jamessan.com> | 2017-11-09 23:19:25 -0500 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2017-11-12 16:45:39 -0500 |
commit | cf75de710cfb817871cb614f2091a11f069db2b7 (patch) | |
tree | accace8dc55504706bf22a7dbf4c6e94bdd78e5a | |
parent | 69e33087716ce67bfda5f67a42f83d77906111f7 (diff) | |
download | rneovim-cf75de710cfb817871cb614f2091a11f069db2b7.tar.gz rneovim-cf75de710cfb817871cb614f2091a11f069db2b7.tar.bz2 rneovim-cf75de710cfb817871cb614f2091a11f069db2b7.zip |
tui_spec: Convert nil to "" before formatting it
This fixes an apparent difference in behavior between Lua and LuaJIT.
Lua fails to format nil:
test/functional/terminal/tui_spec.lua:381: bad argument #2 to 'format' (string expected, got nil)
-rw-r--r-- | test/functional/terminal/tui_spec.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua index d36eb46e54..777ef65d9e 100644 --- a/test/functional/terminal/tui_spec.lua +++ b/test/functional/terminal/tui_spec.lua @@ -380,7 +380,7 @@ describe("tui 't_Co' (terminal colors)", function() -- TODO: Revisit this after jobstart/termopen accept `env` dict. screen = thelpers.screen_setup(0, string.format( [=[['sh', '-c', 'LANG=C TERM=%s %s %s -u NONE -i NONE --cmd "silent set noswapfile noshowcmd noruler"']]=], - term, + term or "", (colorterm ~= nil and "COLORTERM="..colorterm or ""), helpers.nvim_prog)) |