]> granicus.if.org Git - vim/commitdiff
patch 7.4.1297 v7.4.1297
authorBram Moolenaar <Bram@vim.org>
Tue, 9 Feb 2016 22:33:25 +0000 (23:33 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 9 Feb 2016 22:33:25 +0000 (23:33 +0100)
Problem:    On Mac test_channel leaves python instances running.
Solution:   Use a small waittime to make ch_open() work. (Ozaki Kiichi)

src/testdir/test_channel.vim
src/version.c

index 7d82094f216c9552348600710e6b83018ce265af..432171d9b4b5c35575cac1d6f4c0f0c0295da69c 100644 (file)
@@ -23,6 +23,7 @@ else
 endif
 
 let s:port = -1
+let s:chopt = has('macunix') ? {'waittime' : 1} : {}
 
 func s:start_server()
   " The Python program writes the port number in Xportnr.
@@ -60,7 +61,7 @@ func s:start_server()
   endif
   let s:port = l[0]
 
-  let handle = ch_open('localhost:' . s:port)
+  let handle = ch_open('localhost:' . s:port, s:chopt)
   return handle
 endfunc
 
@@ -155,7 +156,7 @@ func Test_two_channels()
   endif
   call assert_equal('got it', ch_sendexpr(handle, 'hello!'))
 
-  let newhandle = ch_open('localhost:' . s:port)
+  let newhandle = ch_open('localhost:' . s:port, s:chopt)
   call assert_equal('got it', ch_sendexpr(newhandle, 'hello!'))
   call assert_equal('got it', ch_sendexpr(handle, 'hello!'))
 
@@ -181,7 +182,7 @@ endfunc
 " Test that trying to connect to a non-existing port fails quickly.
 func Test_connect_waittime()
   let start = reltime()
-  let handle = ch_open('localhost:9876')
+  let handle = ch_open('localhost:9876', s:chopt)
   if handle >= 0
     " Oops, port does exists.
     call ch_close(handle)
index 131ef4bc1a07a5de649f20a54c6d5c8fbc03dbe8..23ee41b6198351c2b02a8a8f9170865c7e2f1f5f 100644 (file)
@@ -747,6 +747,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1297,
 /**/
     1296,
 /**/