summaryrefslogtreecommitdiff
path: root/src/testdir/test_channel.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-09-26 22:36:58 +0200
committerBram Moolenaar <Bram@vim.org>2016-09-26 22:36:58 +0200
commit7ef3810d28b7ab2edbfcafab3fe8ad8bc2c2f138 (patch)
tree9e53fef5708789fd930f86172c1fff8529f27f74 /src/testdir/test_channel.vim
parent1eceadaf481e34ed8155011534159775697ce884 (diff)
downloadvim-7ef3810d28b7ab2edbfcafab3fe8ad8bc2c2f138.zip
patch 8.0.0015
Problem: Can't tell which part of a channel has "buffered" status. Solution: Add an optional argument to ch_status(). Let ch_info() also return "buffered" for out_status and err_status.
Diffstat (limited to 'src/testdir/test_channel.vim')
-rw-r--r--src/testdir/test_channel.vim17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim
index f8252f1a3..eb75a0b1d 100644
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -434,6 +434,23 @@ func Test_raw_pipe()
let job = job_start(s:python . " test_channel_pipe.py", {'mode': 'raw'})
call assert_equal(v:t_job, type(job))
call assert_equal("run", job_status(job))
+
+ call assert_equal("open", ch_status(job))
+ call assert_equal("open", ch_status(job), {"part": "out"})
+ call assert_equal("open", ch_status(job), {"part": "err"})
+ call assert_fails('call ch_status(job, {"in_mode": "raw"})', 'E475:')
+ call assert_fails('call ch_status(job, {"part": "in"})', 'E475:')
+
+ let dict = ch_info(job)
+ call assert_true(dict.id != 0)
+ call assert_equal('open', dict.status)
+ call assert_equal('open', dict.out_status)
+ call assert_equal('RAW', dict.out_mode)
+ call assert_equal('pipe', dict.out_io)
+ call assert_equal('open', dict.err_status)
+ call assert_equal('RAW', dict.err_mode)
+ call assert_equal('pipe', dict.err_io)
+
try
" For a change use the job where a channel is expected.
call ch_sendraw(job, "echo something\n")