Mercurial > vim
diff src/testdir/test_channel.vim @ 8669:06848fe9c816 v7.4.1624
commit https://github.com/vim/vim/commit/03602ec28ed25739e88b2c835adb0662d3720bb2
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Mar 20 20:57:45 2016 +0100
patch 7.4.1624
Problem: Can't get info about a channel.
Solution: Add ch_info().
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 20 Mar 2016 21:00:05 +0100 |
parents | 1eb302bf2475 |
children | 289765409225 |
line wrap: on
line diff
--- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -120,9 +120,16 @@ func s:communicate(port) return endif if has('job') - " check that no job is handled correctly + " check that getjob without a job is handled correctly call assert_equal('no process', string(ch_getjob(handle))) endif + let dict = ch_info(handle) + call assert_true(dict.id != 0) + call assert_equal('open', dict.status) + call assert_equal(a:port, string(dict.port)) + call assert_equal('open', dict.sock_status) + call assert_equal('socket', dict.sock_io) + " Simple string request and reply. call assert_equal('got it', ch_evalexpr(handle, 'hello!'))