mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
test: helpers.lua: add temporary set_session() function
This function is needed until helpers.lua is refactored to support multiple sessions.
This commit is contained in:
parent
2275297f4a
commit
04806dee4b
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user