From 704f3dd8553ad5239e87e9e3606d9315e069283a Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Sun, 10 Apr 2016 23:46:11 -0300 Subject: Synchronize shada reset helper with other functional tests --- test/functional/helpers.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/functional/helpers.lua') diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index 4e294029ab..919e6e077b 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -59,6 +59,9 @@ end local session, loop_running, last_error local function set_session(s) + if session then + session:exit(0) + end session = s end @@ -218,15 +221,12 @@ local function spawn(argv, merge) end local function clear(extra_cmd) - if session then - session:exit(0) - end local args = {unpack(nvim_argv)} if extra_cmd ~= nil then table.insert(args, '--cmd') table.insert(args, extra_cmd) end - session = spawn(args) + set_session(spawn(args)) end local function insert(...) -- cgit From c18d5917e3442162f20eb9e95ba4bcffbbd8408b Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Wed, 13 Apr 2016 09:21:32 -0300 Subject: Update lua client to 0.0.1-24 The new version of the lua client uses libmpack as a backend, and some test scripts had to be updated to reflect that. --- test/functional/helpers.lua | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'test/functional/helpers.lua') diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua index 919e6e077b..a382641cff 100644 --- a/test/functional/helpers.lua +++ b/test/functional/helpers.lua @@ -1,9 +1,8 @@ require('coxpcall') +NIL = require('mpack').NIL local lfs = require('lfs') local assert = require('luassert') -local Loop = require('nvim.loop') -local MsgpackStream = require('nvim.msgpack_stream') -local AsyncSession = require('nvim.async_session') +local ChildProcessStream = require('nvim.child_process_stream') local Session = require('nvim.session') local nvim_prog = os.getenv('NVIM_PROG') or 'build/bin/nvim' @@ -60,7 +59,7 @@ local session, loop_running, last_error local function set_session(s) if session then - session:exit(0) + session:close() end session = s end @@ -212,12 +211,8 @@ local function merge_args(...) end local function spawn(argv, merge) - local loop = Loop.new() - local msgpack_stream = MsgpackStream.new(loop) - local async_session = AsyncSession.new(msgpack_stream) - local sess = Session.new(async_session) - loop:spawn(merge and merge_args(prepend_argv, argv) or argv) - return sess + local child_stream = ChildProcessStream.spawn(merge and merge_args(prepend_argv, argv) or argv) + return Session.new(child_stream) end local function clear(extra_cmd) -- cgit