summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-12-01 16:41:50 +0100
committerBram Moolenaar <Bram@vim.org>2016-12-01 16:41:50 +0100
commit65e08ee1d26aa7bf341ac0e0400839d696d1ab64 (patch)
tree50da95e684996687d9a3d474317f88d95dd99129
parent958dc6923d341390531888058495569d73c356c3 (diff)
downloadvim-git-8.0.0108.tar.gz
patch 8.0.0108v8.0.0108
Problem: The channel "drop" option is not tested. Solution: Add a test.
-rw-r--r--src/testdir/test_channel.vim7
-rw-r--r--src/version.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim
index 85f80e25c..31c2e5017 100644
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -129,6 +129,9 @@ func Ch_communicate(port)
call ch_setoptions(handle, {'mode': 'json'})
call assert_fails("call ch_setoptions(handle, {'waittime': 111})", "E475")
call ch_setoptions(handle, {'callback': ''})
+ call ch_setoptions(handle, {'drop': 'never'})
+ call ch_setoptions(handle, {'drop': 'auto'})
+ call assert_fails("call ch_setoptions(handle, {'drop': 'bad'})", "E475")
" Send an eval request that works.
call assert_equal('ok', ch_evalexpr(handle, 'eval-works'))
@@ -249,6 +252,7 @@ endfunc
"""""""""
func Ch_handler(chan, msg)
+ call ch_log('Ch_handler()')
unlet g:Ch_reply
let g:Ch_reply = a:msg
endfunc
@@ -272,6 +276,7 @@ func Ch_channel_handler(port)
endfunc
func Test_channel_handler()
+call ch_logfile('channellog', 'w')
call ch_log('Test_channel_handler()')
let g:Ch_reply = ""
let s:chopt.callback = 'Ch_handler'
@@ -437,7 +442,7 @@ func Test_raw_pipe()
" Add a dummy close callback to avoid that messages are dropped when calling
" ch_canread().
let job = job_start(s:python . " test_channel_pipe.py",
- \ {'mode': 'raw', 'close_cb': {chan -> 0}})
+ \ {'mode': 'raw', 'drop': 'never'})
call assert_equal(v:t_job, type(job))
call assert_equal("run", job_status(job))
diff --git a/src/version.c b/src/version.c
index c683ed531..c4977dea7 100644
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 108,
+/**/
107,
/**/
106,