aboutsummaryrefslogtreecommitdiff
path: root/test/functional/plugin/shada_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-08-06 01:36:01 +0200
committerGitHub <noreply@github.com>2019-08-06 01:36:01 +0200
commit067a39ba854cc02a750911ead968a744b2769aac (patch)
tree05d9594c9c8a0f89d49415a611d19c713aef705c /test/functional/plugin/shada_spec.lua
parenta29358dc58a11c7f6b82844d8309d5a5b2c8cb91 (diff)
parentf6c94124368bd14a83e83d4f172b8939d0503daf (diff)
downloadrneovim-067a39ba854cc02a750911ead968a744b2769aac.tar.gz
rneovim-067a39ba854cc02a750911ead968a744b2769aac.tar.bz2
rneovim-067a39ba854cc02a750911ead968a744b2769aac.zip
Merge #10701 from justinmk/test-fixes
test: Eliminate plugin/helpers.lua
Diffstat (limited to 'test/functional/plugin/shada_spec.lua')
-rw-r--r--test/functional/plugin/shada_spec.lua17
1 files changed, 14 insertions, 3 deletions
diff --git a/test/functional/plugin/shada_spec.lua b/test/functional/plugin/shada_spec.lua
index 1482d83ee6..778dc4e219 100644
--- a/test/functional/plugin/shada_spec.lua
+++ b/test/functional/plugin/shada_spec.lua
@@ -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'}