Mercurial > vim
diff src/testdir/test_channel.vim @ 8746:4c38a4733578 v7.4.1662
commit https://github.com/vim/vim/commit/c4dcd60c76666bf113719f929709ad6120eb6528
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 26 22:56:46 2016 +0100
patch 7.4.1662
Problem: No test for an invalid Ex command on a channel.
Solution: Test handling an invalid command gracefully. Avoid getting an
error message, do write it to the channel log.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 26 Mar 2016 23:00:05 +0100 |
parents | ff9973bbbfcb |
children | 65a5a18d3acf |
line wrap: on
line diff
--- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -151,6 +151,11 @@ func s:communicate(port) call assert_equal('added1', getline(line('$') - 1)) call assert_equal('added2', getline('$')) + " Request command "foo bar", which fails silently. + call assert_equal('ok', ch_evalexpr(handle, 'bad command')) + call s:waitFor('v:errmsg =~ "E492"') + call assert_true(v:errmsg =~ 'E492:.*foo bar') + call assert_equal('ok', ch_evalexpr(handle, 'do normal', {'timeout': 100})) call s:waitFor('"added more" == getline("$")') call assert_equal('added more', getline('$'))