From 4df38ec9df4764d4b2ae0b12c1b62c34889f1aa5 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 16 Sep 2019 19:16:39 +0200 Subject: server_requests_spec: fix assertion, pass Lua paths via args (#10875) This makes it pick up the nvim Luarocks module properly when not installed via third-party. --- test/functional/api/server_requests_spec.lua | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'test/functional/api/server_requests_spec.lua') diff --git a/test/functional/api/server_requests_spec.lua b/test/functional/api/server_requests_spec.lua index e275d8cd35..5a9ef7dd40 100644 --- a/test/functional/api/server_requests_spec.lua +++ b/test/functional/api/server_requests_spec.lua @@ -241,10 +241,14 @@ describe('server -> client', function() \ 'rpc': v:true \ } ]]) - meths.set_var("args", {helpers.test_lua_prg, - 'test/functional/api/rpc_fixture.lua'}) + meths.set_var("args", { + helpers.test_lua_prg, + 'test/functional/api/rpc_fixture.lua', + package.path, + package.cpath, + }) jobid = eval("jobstart(g:args, g:job_opts)") - neq(0, 'jobid') + neq(0, jobid) end) after_each(function() @@ -254,7 +258,11 @@ describe('server -> client', function() if helpers.pending_win32(pending) then return end it('rpc and text stderr can be combined', function() - eq("ok",funcs.rpcrequest(jobid, "poll")) + local status, rv = pcall(funcs.rpcrequest, jobid, 'poll') + if not status then + error(string.format('missing nvim Lua module? (%s)', rv)) + end + eq('ok', rv) funcs.rpcnotify(jobid, "ping") eq({'notification', 'pong', {}}, next_msg()) eq("done!",funcs.rpcrequest(jobid, "write_stderr", "fluff\n")) -- cgit From 4bbad5481773ac2a273a41a9fe8035ca57e03cd8 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Fri, 18 Oct 2019 04:46:30 +0200 Subject: tests: fix non-controversial misuse of `pending` (#11247) Ref: https://github.com/neovim/neovim/pull/11184 --- test/functional/api/server_requests_spec.lua | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'test/functional/api/server_requests_spec.lua') diff --git a/test/functional/api/server_requests_spec.lua b/test/functional/api/server_requests_spec.lua index 5a9ef7dd40..61184d2c59 100644 --- a/test/functional/api/server_requests_spec.lua +++ b/test/functional/api/server_requests_spec.lua @@ -317,8 +317,7 @@ describe('server -> client', function() set_session(server) local status, address = pcall(funcs.serverstart, "127.0.0.1:") if not status then - pending('no ipv4 stack', function() end) - return + pending('no ipv4 stack') end eq('127.0.0.1:', string.sub(address,1,10)) connect_test(server, 'tcp', address) @@ -329,8 +328,7 @@ describe('server -> client', function() set_session(server) local status, address = pcall(funcs.serverstart, '::1:') if not status then - pending('no ipv6 stack', function() end) - return + pending('no ipv6 stack') end eq('::1:', string.sub(address,1,4)) connect_test(server, 'tcp', address) @@ -349,8 +347,7 @@ describe('server -> client', function() it('does not deadlock', function() if not helpers.isCI('travis') and helpers.is_os('mac') then -- It does, in fact, deadlock on QuickBuild. #6851 - pending("deadlocks on QuickBuild", function() end) - return + pending("deadlocks on QuickBuild") end local address = funcs.serverlist()[1] local first = string.sub(address,1,1) -- cgit From 019c8d13dd7056725c0715dc15e451118b767b7d Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 19 Oct 2019 18:04:08 -0700 Subject: build/doc/CI: remove/update quickbuild references #11258 --- test/functional/api/server_requests_spec.lua | 4 ---- 1 file changed, 4 deletions(-) (limited to 'test/functional/api/server_requests_spec.lua') diff --git a/test/functional/api/server_requests_spec.lua b/test/functional/api/server_requests_spec.lua index 61184d2c59..237a4b01e4 100644 --- a/test/functional/api/server_requests_spec.lua +++ b/test/functional/api/server_requests_spec.lua @@ -345,10 +345,6 @@ describe('server -> client', function() describe('connecting to its own pipe address', function() it('does not deadlock', function() - if not helpers.isCI('travis') and helpers.is_os('mac') then - -- It does, in fact, deadlock on QuickBuild. #6851 - pending("deadlocks on QuickBuild") - end local address = funcs.serverlist()[1] local first = string.sub(address,1,1) ok(first == '/' or first == '\\') -- cgit