Patch 8.0.0108 (after 8.0.0107)
Problem:    The channel "drop" option is not tested.
Solution:   Add a test.
Files:      src/testdir/test_channel.vim


*** ../vim-8.0.0107/src/testdir/test_channel.vim        2016-11-29 
21:54:41.116260206 +0100
--- src/testdir/test_channel.vim        2016-12-01 16:38:49.326026563 +0100
***************
*** 129,134 ****
--- 129,137 ----
    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,254 ****
--- 252,258 ----
  """""""""
  
  func Ch_handler(chan, msg)
+   call ch_log('Ch_handler()')
    unlet g:Ch_reply
    let g:Ch_reply = a:msg
  endfunc
***************
*** 272,277 ****
--- 276,282 ----
  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,443 ****
    " 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}})
    call assert_equal(v:t_job, type(job))
    call assert_equal("run", job_status(job))
  
--- 442,448 ----
    " 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', 'drop': 'never'})
    call assert_equal(v:t_job, type(job))
    call assert_equal("run", job_status(job))
  
*** ../vim-8.0.0107/src/version.c       2016-12-01 15:34:04.087413921 +0100
--- src/version.c       2016-12-01 16:31:56.204722973 +0100
***************
*** 766,767 ****
--- 766,769 ----
  {   /* Add new patch number below this line */
+ /**/
+     108,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
63. You start using smileys in your snail mail.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui