Mercurial > vim
diff src/testdir/test_channel.py @ 7918:ce5a7a613867 v7.4.1255
commit https://github.com/vim/vim/commit/66624ff0d9e1de2fc5eb4f95f3a3a2ed70b10138
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Feb 3 23:59:43 2016 +0100
patch 7.4.1255
Problem: Crash for channel "eval" command without third argument.
Solution: Check for missing argument.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 04 Feb 2016 00:00:05 +0100 |
parents | 54602dcac207 |
children | 1ebc7be4dbbf |
line wrap: on
line diff
--- a/src/testdir/test_channel.py +++ b/src/testdir/test_channel.py @@ -68,8 +68,8 @@ class ThreadedTCPRequestHandler(socketse # 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(socketse 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