summaryrefslogtreecommitdiff
path: root/src/testdir
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-03-07 21:19:38 +0100
committerBram Moolenaar <Bram@vim.org>2016-03-07 21:19:38 +0100
commit151f656e171f6ffbb0cbeb343cbcf2ffac0c36b0 (patch)
tree9d0094ba079f1444440420cacfa54023620d42cf /src/testdir
parent47cff3a444be7e99bae52b39b2174c22d58d2f86 (diff)
downloadvim-151f656e171f6ffbb0cbeb343cbcf2ffac0c36b0.zip
patch 7.4.1509
Problem: Keeping both a variable for a job and the channel it refers to is a hassle. Solution: Allow passing the job where a channel is expected. (Damien)
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test_channel.vim12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim
index 299bb2ba7..5a315679c 100644
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -463,16 +463,16 @@ func Test_raw_pipe()
let job = job_start(s:python . " test_channel_pipe.py", {'mode': 'raw'})
call assert_equal("run", job_status(job))
try
- let handle = job_getchannel(job)
- call ch_sendraw(handle, "echo something\n")
- let msg = ch_readraw(handle)
+ " For a change use the job where a channel is expected.
+ call ch_sendraw(job, "echo something\n")
+ let msg = ch_readraw(job)
call assert_equal("something\n", substitute(msg, "\r", "", 'g'))
- call ch_sendraw(handle, "double this\n")
- let msg = ch_readraw(handle)
+ call ch_sendraw(job, "double this\n")
+ let msg = ch_readraw(job)
call assert_equal("this\nAND this\n", substitute(msg, "\r", "", 'g'))
- let reply = ch_evalraw(handle, "quit\n", {'timeout': 100})
+ let reply = ch_evalraw(job, "quit\n", {'timeout': 100})
call assert_equal("Goodbye!\n", substitute(reply, "\r", "", 'g'))
finally
call job_stop(job)