comparison src/testdir/test_channel.py @ 8653:d80edead9675 v7.4.1616

commit https://github.com/vim/vim/commit/ac74d5e86cd16b42e81ba48f58f3d45c72758248 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 20 14:31:00 2016 +0100 patch 7.4.1616 Problem: Malformed channel request causes a hang. Solution: Drop malformed message. (Damien)
author Christian Brabandt <cb@256bit.org>
date Sun, 20 Mar 2016 14:45:04 +0100
parents 8894d595b786
children 1eb302bf2475
comparison
equal deleted inserted replaced
8652:73a5940e5002 8653:d80edead9675
99 self.request.sendall(cmd.encode('utf-8')) 99 self.request.sendall(cmd.encode('utf-8'))
100 response = "ok" 100 response = "ok"
101 elif decoded[1] == 'eval-bad': 101 elif decoded[1] == 'eval-bad':
102 # Send an eval request missing the third argument. 102 # Send an eval request missing the third argument.
103 cmd = '["expr","xxx"]' 103 cmd = '["expr","xxx"]'
104 print("sending: {}".format(cmd))
105 self.request.sendall(cmd.encode('utf-8'))
106 response = "ok"
107 elif decoded[1] == 'malformed':
108 cmd = '["ex",":"]wrong!["ex","smi"]'
104 print("sending: {}".format(cmd)) 109 print("sending: {}".format(cmd))
105 self.request.sendall(cmd.encode('utf-8')) 110 self.request.sendall(cmd.encode('utf-8'))
106 response = "ok" 111 response = "ok"
107 elif decoded[1] == 'an expr': 112 elif decoded[1] == 'an expr':
108 # Send an expr request. 113 # Send an expr request.