summaryrefslogtreecommitdiff
path: root/src/testdir/test_channel.py
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-03-26 22:56:46 +0100
committerBram Moolenaar <Bram@vim.org>2016-03-26 22:56:46 +0100
commitc4dcd60c76666bf113719f929709ad6120eb6528 (patch)
tree5e6312286de30efa69d0f85443c67ced43b782a2 /src/testdir/test_channel.py
parentfa8b2e173dd5f6c4a5cfd326abdcf68b8eebf90d (diff)
downloadvim-git-c4dcd60c76666bf113719f929709ad6120eb6528.tar.gz
patch 7.4.1662v7.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.
Diffstat (limited to 'src/testdir/test_channel.py')
-rw-r--r--src/testdir/test_channel.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/testdir/test_channel.py b/src/testdir/test_channel.py
index 227780a5e..b5a912c07 100644
--- a/src/testdir/test_channel.py
+++ b/src/testdir/test_channel.py
@@ -73,6 +73,11 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler):
print("sending: {0}".format(cmd))
self.request.sendall(cmd.encode('utf-8'))
response = "ok"
+ elif decoded[1] == 'bad command':
+ cmd = '["ex","foo bar"]'
+ print("sending: {0}".format(cmd))
+ self.request.sendall(cmd.encode('utf-8'))
+ response = "ok"
elif decoded[1] == 'do normal':
# Send a normal command.
cmd = '["normal","G$s more\u001b"]'