diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-03-03 21:02:23 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-03-03 21:02:23 +0100 |
commit | c25558bff4ed10d2642e6f5c016701641c494916 (patch) | |
tree | 8ddf1725387cda32c9acc707e09c0ec0debb5f4e /src/testdir/test_channel.vim | |
parent | d6547fc6471d9084f942bdc4ae3aedb39361751d (diff) | |
download | vim-git-c25558bff4ed10d2642e6f5c016701641c494916.tar.gz |
patch 7.4.1484v7.4.1484
Problem: Channel "err-io" value "out" is not supported.
Solution: Connect stderr to stdout if wanted.
Diffstat (limited to 'src/testdir/test_channel.vim')
-rw-r--r-- | src/testdir/test_channel.vim | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim index bc43b446e..c8779344d 100644 --- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -339,10 +339,8 @@ func s:raw_one_time_callback(port) endfunc func Test_raw_one_time_callback() - call ch_logfile('channellog', 'w') call ch_log('Test_raw_one_time_callback()') call s:run_server('s:raw_one_time_callback') - call ch_logfile('') endfunc """"""""" @@ -420,6 +418,9 @@ func Test_nl_pipe() call ch_sendraw(handle, "echo something\n") call assert_equal("something", ch_readraw(handle)) + call ch_sendraw(handle, "echoerr wrong\n") + call assert_equal("wrong", ch_readraw(handle, {'part': 'err'})) + call ch_sendraw(handle, "double this\n") call assert_equal("this", ch_readraw(handle)) call assert_equal("AND this", ch_readraw(handle)) @@ -431,6 +432,25 @@ func Test_nl_pipe() endtry endfunc +func Test_nl_err_to_out_pipe() + if !has('job') + return + endif + call ch_log('Test_nl_err_to_out_pipe()') + let job = job_start(s:python . " test_channel_pipe.py", {'err-io': 'out'}) + call assert_equal("run", job_status(job)) + try + let handle = job_getchannel(job) + call ch_sendraw(handle, "echo something\n") + call assert_equal("something", ch_readraw(handle)) + + call ch_sendraw(handle, "echoerr wrong\n") + call assert_equal("wrong", ch_readraw(handle)) + finally + call job_stop(job) + endtry +endfunc + func Test_pipe_to_buffer() if !has('job') return |