aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/server_requests_spec.lua
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2017-11-02 05:45:38 -0400
committerJustin M. Keyes <justinkz@gmail.com>2017-11-02 10:45:38 +0100
commita39c8b7ce30ddeed4329c28c42b1b699103dccab (patch)
tree10bed9f903432149405fb66d80e5f5411b4995ca /test/functional/api/server_requests_spec.lua
parent54b79f19d7c63e5a7673264665d95dac335ede2c (diff)
downloadrneovim-a39c8b7ce30ddeed4329c28c42b1b699103dccab.tar.gz
rneovim-a39c8b7ce30ddeed4329c28c42b1b699103dccab.tar.bz2
rneovim-a39c8b7ce30ddeed4329c28c42b1b699103dccab.zip
test: server_spec: Tolerate missing protocol (#7478)
Travis disabled IPv6: [ RUN ] serverstart(), serverstop() parses endpoints correctly: FAIL ...build/neovim/neovim/test/functional/eval/server_spec.lua:83: Expected objects to be the same. Passed in: (table) { [1] = '127.0.0.1:12345' } Expected: (table) { [1] = '127.0.0.1:12345' *[2] = '::1:12345' } Change all tests to ensure a server was actually started before expecting it to be returned from serverlist().
Diffstat (limited to 'test/functional/api/server_requests_spec.lua')
-rw-r--r--test/functional/api/server_requests_spec.lua18
1 files changed, 17 insertions, 1 deletions
diff --git a/test/functional/api/server_requests_spec.lua b/test/functional/api/server_requests_spec.lua
index 4380e52b8b..a2a198ca83 100644
--- a/test/functional/api/server_requests_spec.lua
+++ b/test/functional/api/server_requests_spec.lua
@@ -304,14 +304,30 @@ describe('server -> client', function()
connect_test(server, 'pipe', address)
end)
- it('via ip address', function()
+ it('via ipv4 address', function()
local server = spawn(nvim_argv)
set_session(server)
local address = funcs.serverstart("127.0.0.1:")
+ if #address == 0 then
+ pending('no ipv4 stack', function() end)
+ return
+ end
eq('127.0.0.1:', string.sub(address,1,10))
connect_test(server, 'tcp', address)
end)
+ it('via ipv6 address', function()
+ local server = spawn(nvim_argv)
+ set_session(server)
+ local address = funcs.serverstart('::1:')
+ if #address == 0 then
+ pending('no ipv6 stack', function() end)
+ return
+ end
+ eq('::1:', string.sub(address,1,4))
+ connect_test(server, 'tcp', address)
+ end)
+
it('via hostname', function()
local server = spawn(nvim_argv)
set_session(server)