aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/functional/shada/compatibility_spec.lua6
-rw-r--r--test/functional/shada/errors_spec.lua6
-rw-r--r--test/functional/shada/helpers.lua13
-rw-r--r--test/functional/shada/marks_spec.lua5
-rw-r--r--test/functional/shada/merging_spec.lua6
-rw-r--r--test/functional/shada/shada_spec.lua10
6 files changed, 17 insertions, 29 deletions
diff --git a/test/functional/shada/compatibility_spec.lua b/test/functional/shada/compatibility_spec.lua
index 485e8a183c..295678d8d6 100644
--- a/test/functional/shada/compatibility_spec.lua
+++ b/test/functional/shada/compatibility_spec.lua
@@ -3,12 +3,12 @@ local helpers = require('test.functional.helpers')
local nvim, nvim_window, nvim_curwin, nvim_command, nvim_feed, nvim_eval, eq =
helpers.nvim, helpers.window, helpers.curwin, helpers.command, helpers.feed,
helpers.eval, helpers.eq
+local exc_exec = helpers.exc_exec
local shada_helpers = require('test.functional.shada.helpers')
-local reset, set_additional_cmd, clear, exc_exec, get_shada_rw =
+local reset, set_additional_cmd, clear, get_shada_rw =
shada_helpers.reset, shada_helpers.set_additional_cmd,
- shada_helpers.clear, shada_helpers.exc_exec,
- shada_helpers.get_shada_rw
+ shada_helpers.clear, shada_helpers.get_shada_rw
local read_shada_file = shada_helpers.read_shada_file
local wshada, sdrcmd, shada_fname = get_shada_rw('Xtest-functional-shada-compatibility.shada')
diff --git a/test/functional/shada/errors_spec.lua b/test/functional/shada/errors_spec.lua
index ce849fdcbd..b612ed48c5 100644
--- a/test/functional/shada/errors_spec.lua
+++ b/test/functional/shada/errors_spec.lua
@@ -3,12 +3,12 @@ local helpers = require('test.functional.helpers')
local nvim, nvim_window, nvim_curwin, nvim_command, nvim_feed, nvim_eval, eq =
helpers.nvim, helpers.window, helpers.curwin, helpers.command, helpers.feed,
helpers.eval, helpers.eq
+local exc_exec = helpers.exc_exec
local shada_helpers = require('test.functional.shada.helpers')
-local reset, set_additional_cmd, clear, exc_exec, get_shada_rw =
+local reset, set_additional_cmd, clear, get_shada_rw =
shada_helpers.reset, shada_helpers.set_additional_cmd,
- shada_helpers.clear, shada_helpers.exc_exec,
- shada_helpers.get_shada_rw
+ shada_helpers.clear, shada_helpers.get_shada_rw
local wshada, sdrcmd, shada_fname, clean =
get_shada_rw('Xtest-functional-shada-errors.shada')
diff --git a/test/functional/shada/helpers.lua b/test/functional/shada/helpers.lua
index b3153ca7f1..3af92112cb 100644
--- a/test/functional/shada/helpers.lua
+++ b/test/functional/shada/helpers.lua
@@ -42,19 +42,6 @@ local clear = function()
set_additional_cmd('')
end
-local exc_exec = function(cmd)
- nvim_command(([[
- try
- execute "%s"
- catch
- let g:__exception = v:exception
- endtry
- ]]):format(cmd:gsub('\n', '\\n'):gsub('[\\"]', '\\%0')))
- local ret = nvim_eval('get(g:, "__exception", 0)')
- nvim_command('unlet! g:__exception')
- return ret
-end
-
local get_shada_rw = function(fname)
local wshada = function(text)
write_file(fname, text, true)
diff --git a/test/functional/shada/marks_spec.lua b/test/functional/shada/marks_spec.lua
index dc7a710143..18ce470cb7 100644
--- a/test/functional/shada/marks_spec.lua
+++ b/test/functional/shada/marks_spec.lua
@@ -3,11 +3,12 @@ local helpers = require('test.functional.helpers')
local nvim, nvim_window, nvim_curwin, nvim_command, nvim_feed, nvim_eval, eq =
helpers.nvim, helpers.window, helpers.curwin, helpers.command, helpers.feed,
helpers.eval, helpers.eq
+local exc_exec = helpers.exc_exec
local shada_helpers = require('test.functional.shada.helpers')
-local reset, set_additional_cmd, clear, exc_exec =
+local reset, set_additional_cmd, clear =
shada_helpers.reset, shada_helpers.set_additional_cmd,
- shada_helpers.clear, shada_helpers.exc_exec
+ shada_helpers.clear
local nvim_current_line = function()
return nvim_window('get_cursor', nvim_curwin())[1]
diff --git a/test/functional/shada/merging_spec.lua b/test/functional/shada/merging_spec.lua
index 9d0d00f5c6..f7a3c4d9ca 100644
--- a/test/functional/shada/merging_spec.lua
+++ b/test/functional/shada/merging_spec.lua
@@ -3,12 +3,12 @@ local helpers = require('test.functional.helpers')
local nvim, nvim_window, nvim_curwin, nvim_command, nvim_feed, nvim_eval, eq =
helpers.nvim, helpers.window, helpers.curwin, helpers.command, helpers.feed,
helpers.eval, helpers.eq
+local exc_exec = helpers.exc_exec
local shada_helpers = require('test.functional.shada.helpers')
-local reset, set_additional_cmd, clear, exc_exec, get_shada_rw =
+local reset, set_additional_cmd, clear, get_shada_rw =
shada_helpers.reset, shada_helpers.set_additional_cmd,
- shada_helpers.clear, shada_helpers.exc_exec,
- shada_helpers.get_shada_rw
+ shada_helpers.clear, shada_helpers.get_shada_rw
local read_shada_file = shada_helpers.read_shada_file
local wshada, sdrcmd, shada_fname =
diff --git a/test/functional/shada/shada_spec.lua b/test/functional/shada/shada_spec.lua
index e256173611..ed022ea65c 100644
--- a/test/functional/shada/shada_spec.lua
+++ b/test/functional/shada/shada_spec.lua
@@ -3,17 +3,17 @@ local helpers = require('test.functional.helpers')
local nvim, nvim_window, nvim_curwin, nvim_command, nvim_feed, nvim_eval, eq =
helpers.nvim, helpers.window, helpers.curwin, helpers.command, helpers.feed,
helpers.eval, helpers.eq
-local write_file, spawn, set_session, nvim_prog =
- helpers.write_file, helpers.spawn, helpers.set_session, helpers.nvim_prog
+local write_file, spawn, set_session, nvim_prog, exc_exec =
+ helpers.write_file, helpers.spawn, helpers.set_session, helpers.nvim_prog,
+ helpers.exc_exec
local lfs = require('lfs')
local msgpack = require('MessagePack')
local shada_helpers = require('test.functional.shada.helpers')
-local reset, set_additional_cmd, clear, exc_exec, get_shada_rw =
+local reset, set_additional_cmd, clear, get_shada_rw =
shada_helpers.reset, shada_helpers.set_additional_cmd,
- shada_helpers.clear, shada_helpers.exc_exec,
- shada_helpers.get_shada_rw
+ shada_helpers.clear, shada_helpers.get_shada_rw
local read_shada_file = shada_helpers.read_shada_file
local wshada, sdrcmd, shada_fname, clean = get_shada_rw('Xtest-functional-shada-shada.shada')