test: Eliminate plugin/helpers.lua

This commit is contained in:
Justin M. Keyes
2019-08-05 10:25:49 +02:00
parent 7086751c5e
commit 330a6713bf
5 changed files with 21 additions and 54 deletions

View File

@@ -1,4 +1,6 @@
local paths = require('test.config.paths')
local helpers = require('test.functional.helpers')(after_each)
local clear = helpers.clear
local eq, nvim_eval, nvim_command, nvim, exc_exec, funcs, nvim_feed, curbuf =
helpers.eq, helpers.eval, helpers.command, helpers.nvim, helpers.exc_exec,
helpers.funcs, helpers.feed, helpers.curbuf
@@ -7,12 +9,21 @@ local read_file = helpers.read_file
local mpack = require('mpack')
local plugin_helpers = require('test.functional.plugin.helpers')
local reset = plugin_helpers.reset
local shada_helpers = require('test.functional.shada.helpers')
local get_shada_rw = shada_helpers.get_shada_rw
local function reset(shada_file)
-- TODO(justinmk): why is this needed?
local rtp_value = ('\'%s/runtime\''):format(
paths.test_source_path:gsub('\'', '\'\''))
clear{args_rm={'-u', '-i'},
args={'-u', 'NORC',
'-i', shada_file or 'NONE',
'--cmd', 'set laststatus&',
'--cmd', 'let &runtimepath='..rtp_value,
}}
end
local mpack_eq = function(expected, mpack_result)
local mpack_keys = {'type', 'timestamp', 'length', 'value'}