summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_channel.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-04-26 15:59:55 +0200
committerBram Moolenaar <Bram@vim.org>2020-04-26 15:59:55 +0200
commit99fa721944dda9d07c53c907c33466728df5c271 (patch)
tree7ead4c06b56e21eb208ea1b9673cd463ba13f3c0 /src/testdir/test_channel.vim
parente297802d6ddbebbf36f9a2d01127c034fab88b3b (diff)
patch 8.2.0644: insufficient testing for invalid function argumentsv8.2.0644
Problem: Insufficient testing for invalid function arguments. Solution: Add more tests. (Yegappan Lakshmanan, closes #5988)
Diffstat (limited to 'src/testdir/test_channel.vim')
-rw-r--r--src/testdir/test_channel.vim7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim
index 4ba552bdbe..4a438ea729 100644
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -869,8 +869,10 @@ func Test_pipe_both_to_buffer()
let job = job_start(s:python . " test_channel_pipe.py",
\ {'out_io': 'buffer', 'out_name': 'pipe-err', 'err_io': 'out'})
call assert_equal("run", job_status(job))
+ let handle = job_getchannel(job)
+ call assert_equal(bufnr('pipe-err'), ch_getbufnr(handle, 'out'))
+ call assert_equal(bufnr('pipe-err'), ch_getbufnr(handle, 'err'))
try
- let handle = job_getchannel(job)
call ch_sendraw(handle, "echo line one\n")
call ch_sendraw(handle, "echoerr line two\n")
call ch_sendraw(handle, "double this\n")
@@ -896,6 +898,9 @@ func Run_test_pipe_from_buffer(use_name)
let job = job_start(s:python . " test_channel_pipe.py", options)
call assert_equal("run", job_status(job))
+ if has('unix') && !a:use_name
+ call assert_equal(bufnr('%'), ch_getbufnr(job, 'in'))
+ endif
try
let handle = job_getchannel(job)
call assert_equal('one', ch_read(handle))