diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-02-03 22:39:51 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-02-03 22:39:51 +0100 |
commit | 608a8919cae982cb38e38725a843df47b234dae6 (patch) | |
tree | a1debac071b9036ad61491e477a0745fc8f51c51 | |
parent | e7bed627c89ed80bc4b2d96f542819029adf6e76 (diff) | |
download | vim-git-608a8919cae982cb38e38725a843df47b234dae6.tar.gz |
patch 7.4.1253v7.4.1253
Problem: Python test server not displaying second of two commands.
Solaris doesn't have "pkill --full".
Solution: Also echo the second command. Use "pkill -f".
-rw-r--r-- | src/testdir/test_channel.py | 24 | ||||
-rw-r--r-- | src/testdir/test_channel.vim | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 16 insertions, 12 deletions
diff --git a/src/testdir/test_channel.py b/src/testdir/test_channel.py index 486ff4d7c..3133c2f40 100644 --- a/src/testdir/test_channel.py +++ b/src/testdir/test_channel.py @@ -34,32 +34,34 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler): thesocket = self.request while True: try: - data = self.request.recv(4096).decode('utf-8') + received = self.request.recv(4096).decode('utf-8') except socket.error: print("=== socket error ===") break except IOError: print("=== socket closed ===") break - if data == '': + if received == '': print("=== socket closed ===") break - print("received: {}".format(data)) + print("received: {}".format(received)) # We may receive two messages at once. Take the part up to the # matching "]" (recognized by finding "]["). - while data != '': - splitidx = data.find('][') + todo = received + while todo != '': + splitidx = todo.find('][') if splitidx < 0: - todo = data - data = '' + used = todo + todo = '' else: - todo = data[:splitidx + 1] - data = data[splitidx + 1:] - print("using: {}".format(todo)) + used = todo[:splitidx + 1] + todo = todo[splitidx + 1:] + if used != received: + print("using: {}".format(used)) try: - decoded = json.loads(todo) + decoded = json.loads(used) except ValueError: print("json decoding failed") decoded = [-1, ''] diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim index d1289903e..de64188e2 100644 --- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -59,7 +59,7 @@ func s:kill_server() if has('win32') call system('taskkill /IM py.exe /T /F /FI "WINDOWTITLE eq test_channel"') else - call system("pkill --full test_channel.py") + call system("pkill -f test_channel.py") endif endfunc diff --git a/src/version.c b/src/version.c index f4e9febae..2d61d4f26 100644 --- a/src/version.c +++ b/src/version.c @@ -743,6 +743,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1253, +/**/ 1252, /**/ 1251, |