diff options
Diffstat (limited to 'test/functional/helpers.lua')
| -rw-r--r-- | test/functional/helpers.lua | 9 | 
1 files changed, 7 insertions, 2 deletions
| diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index 8823a6e003..a51eca7fdc 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -330,6 +330,7 @@ local function clear(...)    local new_args    local env = nil    local opts = select(1, ...) +  local headless = true    if type(opts) == 'table' then      if opts.env then        local env_tbl = {} @@ -355,15 +356,19 @@ 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    set_session(spawn(args, nil, env)) -  -- Dummy request so that --embed continues past UI initialization -  session:request('nvim_eval', "0")  end  local function insert(...) | 
