diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-02-03 23:59:43 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-02-03 23:59:43 +0100 |
commit | 66624ff0d9e1de2fc5eb4f95f3a3a2ed70b10138 (patch) | |
tree | 19c4a12ba5715387bcec4ac7c998a68ed6e63469 /src/testdir/test_channel.py | |
parent | 3b05b135e3ee4cfd59983fd63461e8f7642c1713 (diff) | |
download | vim-66624ff0d9e1de2fc5eb4f95f3a3a2ed70b10138.zip |
patch 7.4.1255
Problem: Crash for channel "eval" command without third argument.
Solution: Check for missing argument.
Diffstat (limited to 'src/testdir/test_channel.py')
-rw-r--r-- | src/testdir/test_channel.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/testdir/test_channel.py b/src/testdir/test_channel.py index f1d774fd1..dbf9eb2c7 100644 --- a/src/testdir/test_channel.py +++ b/src/testdir/test_channel.py @@ -68,8 +68,8 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler): # simply send back a string response = "got it" elif decoded[1] == 'make change': - # Send two ex commands at the same time, before replying to - # the request. + # Send two ex commands at the same time, before + # replying to the request. cmd = '["ex","call append(\\"$\\",\\"added1\\")"]' cmd += '["ex","call append(\\"$\\",\\"added2\\")"]' print("sending: {}".format(cmd)) @@ -87,6 +87,12 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler): print("sending: {}".format(cmd)) self.request.sendall(cmd.encode('utf-8')) response = "ok" + elif decoded[1] == 'eval-bad': + # Send an eval request missing the third argument. + cmd = '["eval","xxx"]' + print("sending: {}".format(cmd)) + self.request.sendall(cmd.encode('utf-8')) + response = "ok" elif decoded[1] == 'eval-result': # Send back the last received eval result. response = last_eval |