Skip to content

Commit a483326

Browse files
committed
patch 7.4.1297
Problem: On Mac test_channel leaves python instances running. Solution: Use a small waittime to make ch_open() work. (Ozaki Kiichi)
1 parent f068dca commit a483326

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/testdir/test_channel.vim

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ else
2323
endif
2424

2525
let s:port = -1
26+
let s:chopt = has('macunix') ? {'waittime' : 1} : {}
2627

2728
func s:start_server()
2829
" The Python program writes the port number in Xportnr.
@@ -60,7 +61,7 @@ func s:start_server()
6061
endif
6162
let s:port = l[0]
6263

63-
let handle = ch_open('localhost:' . s:port)
64+
let handle = ch_open('localhost:' . s:port, s:chopt)
6465
return handle
6566
endfunc
6667

@@ -155,7 +156,7 @@ func Test_two_channels()
155156
endif
156157
call assert_equal('got it', ch_sendexpr(handle, 'hello!'))
157158

158-
let newhandle = ch_open('localhost:' . s:port)
159+
let newhandle = ch_open('localhost:' . s:port, s:chopt)
159160
call assert_equal('got it', ch_sendexpr(newhandle, 'hello!'))
160161
call assert_equal('got it', ch_sendexpr(handle, 'hello!'))
161162

@@ -181,7 +182,7 @@ endfunc
181182
" Test that trying to connect to a non-existing port fails quickly.
182183
func Test_connect_waittime()
183184
let start = reltime()
184-
let handle = ch_open('localhost:9876')
185+
let handle = ch_open('localhost:9876', s:chopt)
185186
if handle >= 0
186187
" Oops, port does exists.
187188
call ch_close(handle)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,8 @@ static char *(features[]) =
747747

748748
static int included_patches[] =
749749
{ /* Add new patch number below this line */
750+
/**/
751+
1297,
750752
/**/
751753
1296,
752754
/**/

0 commit comments

Comments
 (0)