mirror of
https://github.com/neovim/neovim.git
synced 2026-04-05 07:09:23 +00:00
eval: serverstart: Return finalized address to user
In the process of setting up the socket watcher, the address may be changed (e.g., adding the OS-selected port).
This commit is contained in:
@@ -62,12 +62,14 @@ describe('serverstart(), serverstop()', function()
|
||||
clear_serverlist()
|
||||
eq({}, funcs.serverlist())
|
||||
|
||||
funcs.serverstart('127.0.0.1:0') -- assign random port
|
||||
assert(string.match(funcs.serverlist()[1], '127.0.0.1:%d+'))
|
||||
local s = funcs.serverstart('127.0.0.1:0') -- assign random port
|
||||
assert(string.match(s, '127.0.0.1:%d+'))
|
||||
eq(s, funcs.serverlist()[1])
|
||||
clear_serverlist()
|
||||
|
||||
funcs.serverstart('127.0.0.1:') -- assign random port
|
||||
assert(string.match(funcs.serverlist()[1], '127.0.0.1:%d+'))
|
||||
s = funcs.serverstart('127.0.0.1:') -- assign random port
|
||||
assert(string.match(s, '127.0.0.1:%d+'))
|
||||
eq(s, funcs.serverlist()[1])
|
||||
clear_serverlist()
|
||||
|
||||
funcs.serverstart('127.0.0.1:12345')
|
||||
|
||||
Reference in New Issue
Block a user