diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-04-17 01:38:59 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-04-27 16:31:26 +0200 |
commit | 698c4f662d3a30fab1e48dbe7586617a9031a6ea (patch) | |
tree | 733c226b0448d219e4097f50625812a0a809bec1 /test/functional/helpers.lua | |
parent | 17291642bd9a58c39fb4d61f6b6170829a47c73e (diff) | |
download | rneovim-698c4f662d3a30fab1e48dbe7586617a9031a6ea.tar.gz rneovim-698c4f662d3a30fab1e48dbe7586617a9031a6ea.tar.bz2 rneovim-698c4f662d3a30fab1e48dbe7586617a9031a6ea.zip |
test: clear(): remove `opts.headless` parameter
Callers can instead specify `args_rm={'--headless'}`.
TODO: should `nvim_argv` have "--headless" by default? Need to inspect
some uses of spawn(nvim_argv) ...
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r-- | test/functional/helpers.lua | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index 7cb562a776..7851a0fcba 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -394,17 +394,16 @@ end -- removed, e.g. args_rm={'--cmd'} removes all cases of "--cmd" -- (and its value) from the default set. -- env: Map: Defines the environment of the new session. --- headless: Boolean (default=true): Append --headless arg. -- -- Example: -- clear('-e') -- clear{args={'-e'}, args_rm={'-i'}, env={TERM=term}} local function clear(...) local args = {unpack(nvim_argv)} + table.insert(args, '--headless') local new_args local env = nil local opts = select(1, ...) - local headless = true if type(opts) == 'table' then args = remove_args(args, opts.args_rm) if opts.env then @@ -432,15 +431,9 @@ local function clear(...) end end new_args = opts.args or {} - if opts.headless == false then - headless = false - end else new_args = {...} end - if headless then - table.insert(args, '--headless') - end for _, arg in ipairs(new_args) do table.insert(args, arg) end |