aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2015-04-12 00:48:16 -0400
committerJustin M. Keyes <justinkz@gmail.com>2015-04-12 01:02:58 -0400
commit04806dee4bb163738c61d8a3458cc7b24d5413a4 (patch)
tree5ef7f95e0a351157da421fc0c6e9d69d9988c407 /test/functional/helpers.lua
parent2275297f4a6073df6a94aa6894d635468faeb7ae (diff)
downloadrneovim-04806dee4bb163738c61d8a3458cc7b24d5413a4.tar.gz
rneovim-04806dee4bb163738c61d8a3458cc7b24d5413a4.tar.bz2
rneovim-04806dee4bb163738c61d8a3458cc7b24d5413a4.zip
test: helpers.lua: add temporary set_session() function
This function is needed until helpers.lua is refactored to support multiple sessions.
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index 393b42dda5..27c94c34a8 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -18,6 +18,10 @@ if nvim_dir == nvim_prog then
nvim_dir = "."
end
+-- Nvim "Unit Under Test" http://en.wikipedia.org/wiki/Device_under_test
+local NvimUUT = {}
+NvimUUT.__index = NvimUUT
+
local prepend_argv
if os.getenv('VALGRIND') then
@@ -49,6 +53,10 @@ end
local session, loop_running, loop_stopped, last_error
+local function set_session(s)
+ session = s
+end
+
local function request(method, ...)
local status, rv = session:request(method, ...)
if not status then
@@ -305,5 +313,6 @@ return {
curwin = curwin,
curtab = curtab,
curbuf_contents = curbuf_contents,
- wait = wait
+ wait = wait,
+ set_session = set_session
}