Patch 7.4.1877
Problem: No test for invoking "close_cb" when writing to a buffer.
Solution: Add using close_cb to a test case.
Files: src/testdir/test_channel.vim
*** ../vim-7.4.1876/src/testdir/test_channel.vim 2016-05-29
16:16:39.381326993 +0200
--- src/testdir/test_channel.vim 2016-06-02 18:59:22.556438689 +0200
***************
*** 676,687 ****
endtry
endfunc
func Run_test_pipe_to_buffer(use_name, nomod)
if !has('job')
return
endif
call ch_log('Test_pipe_to_buffer()')
! let options = {'out_io': 'buffer'}
if a:use_name
let options['out_name'] = 'pipe-output'
let firstline = 'Reading from channel output...'
--- 676,692 ----
endtry
endfunc
+ func BufCloseCb(ch)
+ let s:bufClosed = 'yes'
+ endfunc
+
func Run_test_pipe_to_buffer(use_name, nomod)
if !has('job')
return
endif
call ch_log('Test_pipe_to_buffer()')
! let s:bufClosed = 'no'
! let options = {'out_io': 'buffer', 'close_cb': 'BufCloseCb'}
if a:use_name
let options['out_name'] = 'pipe-output'
let firstline = 'Reading from channel output...'
***************
*** 704,718 ****
call ch_sendraw(handle, "quit\n")
sp pipe-output
call s:waitFor('line("$") >= 6')
- if getline('$') == 'DETACH'
- $del
- endif
call assert_equal([firstline, 'line one', 'line two', 'this', 'AND this',
'Goodbye!'], getline(1, '$'))
if a:nomod
call assert_equal(0, &modifiable)
else
call assert_equal(1, &modifiable)
endif
bwipe!
finally
call job_stop(job)
--- 709,721 ----
call ch_sendraw(handle, "quit\n")
sp pipe-output
call s:waitFor('line("$") >= 6')
call assert_equal([firstline, 'line one', 'line two', 'this', 'AND this',
'Goodbye!'], getline(1, '$'))
if a:nomod
call assert_equal(0, &modifiable)
else
call assert_equal(1, &modifiable)
endif
+ call assert_equal('yes', s:bufClosed)
bwipe!
finally
call job_stop(job)
*** ../vim-7.4.1876/src/version.c 2016-06-02 18:37:00.776457146 +0200
--- src/version.c 2016-06-02 19:04:17.708434629 +0200
***************
*** 755,756 ****
--- 755,758 ----
{ /* Add new patch number below this line */
+ /**/
+ 1877,
/**/
--
Everyone has a photographic memory. Some don't have film.
/// Bram Moolenaar -- [email protected] -- 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 [email protected].
For more options, visit https://groups.google.com/d/optout.