aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2017-11-09 23:19:25 -0500
committerJames McCoy <jamessan@jamessan.com>2017-11-12 16:45:39 -0500
commitcf75de710cfb817871cb614f2091a11f069db2b7 (patch)
treeaccace8dc55504706bf22a7dbf4c6e94bdd78e5a
parent69e33087716ce67bfda5f67a42f83d77906111f7 (diff)
downloadrneovim-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.lua2
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))