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)
This commit is contained in:
James McCoy 2017-11-09 23:19:25 -05:00
parent 69e3308771
commit cf75de710c
No known key found for this signature in database
GPG Key ID: DFE691AE331BA3DB

View File

@ -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))