diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/testdir/test_channel.py | 7 | ||||
-rw-r--r-- | src/testdir/test_channel_lsp.py | 7 | ||||
-rw-r--r-- | src/testdir/test_netbeans.py | 11 | ||||
-rw-r--r-- | src/testdir/test_netbeans.vim | 46 | ||||
-rw-r--r-- | src/version.c | 2 |
5 files changed, 47 insertions, 26 deletions
diff --git a/src/testdir/test_channel.py b/src/testdir/test_channel.py index 3ef0fde0f8..35c34fc266 100644 --- a/src/testdir/test_channel.py +++ b/src/testdir/test_channel.py @@ -259,7 +259,12 @@ def main(host, port, server_class=ThreadedTCPServer): print("Wait for it...") time.sleep(0.5) - server = server_class((host, port), ThreadedTCPRequestHandler) + addrs = socket.getaddrinfo(host, port, 0, 0, socket.IPPROTO_TCP) + # Each addr is a (family, type, proto, canonname, sockaddr) tuple + sockaddr = addrs[0][4] + server_class.address_family = addrs[0][0] + + server = server_class(sockaddr[0:2], ThreadedTCPRequestHandler) ip, port = server.server_address[0:2] # Start a thread with the server. That thread will then start a new thread diff --git a/src/testdir/test_channel_lsp.py b/src/testdir/test_channel_lsp.py index 2357452d7e..10b4fb43f3 100644 --- a/src/testdir/test_channel_lsp.py +++ b/src/testdir/test_channel_lsp.py @@ -306,7 +306,12 @@ def main(host, port, server_class=ThreadedTCPServer): writePortInFile(port) time.sleep(0.5) - server = server_class((host, port), ThreadedTCPRequestHandler) + addrs = socket.getaddrinfo(host, port, 0, 0, socket.IPPROTO_TCP) + # Each addr is a (family, type, proto, canonname, sockaddr) tuple + sockaddr = addrs[0][4] + server_class.address_family = addrs[0][0] + + server = server_class(sockaddr[0:2], ThreadedTCPRequestHandler) ip, port = server.server_address[0:2] # Start a thread with the server. That thread will then start a new thread diff --git a/src/testdir/test_netbeans.py b/src/testdir/test_netbeans.py index 112602a43f..0d6b096804 100644 --- a/src/testdir/test_netbeans.py +++ b/src/testdir/test_netbeans.py @@ -184,8 +184,13 @@ def writePortInFile(port): if __name__ == "__main__": HOST, PORT = "localhost", 0 - server = ThreadedTCPServer((HOST, PORT), ThreadedTCPRequestHandler) - ip, port = server.server_address + addrs = socket.getaddrinfo(HOST, PORT, 0, 0, socket.IPPROTO_TCP) + # Each addr is a (family, type, proto, canonname, sockaddr) tuple + sockaddr = addrs[0][4] + ThreadedTCPServer.address_family = addrs[0][0] + + server = ThreadedTCPServer(sockaddr[0:2], ThreadedTCPRequestHandler) + ip, port = server.server_address[0:2] # Start a thread with the server. That thread will then start a new thread # for each connection. @@ -199,7 +204,7 @@ if __name__ == "__main__": # Main thread terminates, but the server continues running # until server.shutdown() is called. try: - while server_thread.isAlive(): + while server_thread.is_alive(): server_thread.join(1) except (KeyboardInterrupt, SystemExit): server.shutdown() diff --git a/src/testdir/test_netbeans.vim b/src/testdir/test_netbeans.vim index 70d8be01c8..e458e38961 100644 --- a/src/testdir/test_netbeans.vim +++ b/src/testdir/test_netbeans.vim @@ -887,28 +887,32 @@ func Nb_quit_with_conn(port) return filter(l, 'v:val !~ "^0:geometry="') endfunc - " Establish the connection with the netbeans server - exe 'nbstart :localhost:' .. g:port .. ':star' - call assert_true(has("netbeans_enabled")) - call WaitFor('len(ReadXnetbeans()) >= 3') - let l = ReadXnetbeans() - call assert_equal(['AUTH star', - \ '0:version=0 "2.5"', - \ '0:startupDone=0'], l[-3:]) + try + " Establish the connection with the netbeans server + exe 'nbstart :localhost:' .. g:port .. ':star' + call assert_true(has("netbeans_enabled")) + call WaitFor('len(ReadXnetbeans()) >= 3') + let l = ReadXnetbeans() + call assert_equal(['AUTH star', + \ '0:version=0 "2.5"', + \ '0:startupDone=0'], l[-3:]) - " Open the command buffer to communicate with the server - split Xcmdbuf - call WaitFor('len(ReadXnetbeans()) >= 6') - let l = ReadXnetbeans() - call assert_equal('0:fileOpened=0 "Xcmdbuf" T F', - \ substitute(l[-3], '".*/', '"', '')) - call assert_equal('send: 1:putBufferNumber!15 "Xcmdbuf"', - \ substitute(l[-2], '".*/', '"', '')) - call assert_equal('1:startDocumentListen!16', l[-1]) - sleep 1m - - quit! - quit! + " Open the command buffer to communicate with the server + split Xcmdbuf + call WaitFor('len(ReadXnetbeans()) >= 6') + let l = ReadXnetbeans() + call assert_equal('0:fileOpened=0 "Xcmdbuf" T F', + \ substitute(l[-3], '".*/', '"', '')) + call assert_equal('send: 1:putBufferNumber!15 "Xcmdbuf"', + \ substitute(l[-2], '".*/', '"', '')) + call assert_equal('1:startDocumentListen!16', l[-1]) + sleep 1m + + quit! + quit! + finally + qall! + endtry END if RunVim(['let g:port = ' .. a:port], after, '') call WaitFor('len(ReadXnetbeans()) >= 9') diff --git a/src/version.c b/src/version.c index 1f808f3c62..14d4f64fc8 100644 --- a/src/version.c +++ b/src/version.c @@ -696,6 +696,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1165, +/**/ 1164, /**/ 1163, |