Mercurial > vim
diff src/testdir/test_channel.vim @ 8761:f8707ec9efe4 v7.4.1669
commit https://github.com/vim/vim/commit/8b877ac38e96424a08a8b8eb713ef4b3cf0064be
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Mar 28 19:16:20 2016 +0200
patch 7.4.1669
Problem: When writing buffer lines to a pipe Vim may block.
Solution: Avoid blocking, write more lines later.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 28 Mar 2016 19:30:05 +0200 |
parents | df91c8263f04 |
children | 176647a751d7 |
line wrap: on
line diff
--- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -791,7 +791,7 @@ func Run_test_pipe_from_buffer(use_name) sp pipe-input call setline(1, ['echo one', 'echo two', 'echo three']) - let options = {'in_io': 'buffer'} + let options = {'in_io': 'buffer', 'block_write': 1} if a:use_name let options['in_name'] = 'pipe-input' else @@ -885,7 +885,8 @@ func Test_pipe_io_two_buffers() let job = job_start(s:python . " test_channel_pipe.py", \ {'in_io': 'buffer', 'in_name': 'pipe-input', 'in_top': 0, - \ 'out_io': 'buffer', 'out_name': 'pipe-output'}) + \ 'out_io': 'buffer', 'out_name': 'pipe-output', + \ 'block_write': 1}) call assert_equal("run", job_status(job)) try exe "normal Gaecho hello\<CR>" @@ -920,7 +921,8 @@ func Test_pipe_io_one_buffer() let job = job_start(s:python . " test_channel_pipe.py", \ {'in_io': 'buffer', 'in_name': 'pipe-io', 'in_top': 0, - \ 'out_io': 'buffer', 'out_name': 'pipe-io'}) + \ 'out_io': 'buffer', 'out_name': 'pipe-io', + \ 'block_write': 1}) call assert_equal("run", job_status(job)) try exe "normal Goecho hello\<CR>"