Skip to content

Commit 65e08ee

Browse files
committed
patch 8.0.0108
Problem: The channel "drop" option is not tested. Solution: Add a test.
1 parent 958dc69 commit 65e08ee

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/testdir/test_channel.vim

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ func Ch_communicate(port)
129129
call ch_setoptions(handle, {'mode': 'json'})
130130
call assert_fails("call ch_setoptions(handle, {'waittime': 111})", "E475")
131131
call ch_setoptions(handle, {'callback': ''})
132+
call ch_setoptions(handle, {'drop': 'never'})
133+
call ch_setoptions(handle, {'drop': 'auto'})
134+
call assert_fails("call ch_setoptions(handle, {'drop': 'bad'})", "E475")
132135

133136
" Send an eval request that works.
134137
call assert_equal('ok', ch_evalexpr(handle, 'eval-works'))
@@ -249,6 +252,7 @@ endfunc
249252
"""""""""
250253

251254
func Ch_handler(chan, msg)
255+
call ch_log('Ch_handler()')
252256
unlet g:Ch_reply
253257
let g:Ch_reply = a:msg
254258
endfunc
@@ -272,6 +276,7 @@ func Ch_channel_handler(port)
272276
endfunc
273277

274278
func Test_channel_handler()
279+
call ch_logfile('channellog', 'w')
275280
call ch_log('Test_channel_handler()')
276281
let g:Ch_reply = ""
277282
let s:chopt.callback = 'Ch_handler'
@@ -437,7 +442,7 @@ func Test_raw_pipe()
437442
" Add a dummy close callback to avoid that messages are dropped when calling
438443
" ch_canread().
439444
let job = job_start(s:python . " test_channel_pipe.py",
440-
\ {'mode': 'raw', 'close_cb': {chan -> 0}})
445+
\ {'mode': 'raw', 'drop': 'never'})
441446
call assert_equal(v:t_job, type(job))
442447
call assert_equal("run", job_status(job))
443448

src/version.c

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

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
108,
767769
/**/
768770
107,
769771
/**/

0 commit comments

Comments
 (0)