patch 8.2.0644: insufficient testing for invalid function arguments
Problem: Insufficient testing for invalid function arguments.
Solution: Add more tests. (Yegappan Lakshmanan, closes #5988)
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim
index 4ba552b..4a438ea 100644
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -869,8 +869,10 @@
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 @@
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))