]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 7.4.1253 v7.4.1253
authorBram Moolenaar <Bram@vim.org>
Wed, 3 Feb 2016 21:39:51 +0000 (22:39 +0100)
committerBram Moolenaar <Bram@vim.org>
Wed, 3 Feb 2016 21:39:51 +0000 (22:39 +0100)
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".

src/testdir/test_channel.py
src/testdir/test_channel.vim
src/version.c

index 486ff4d7c6beeb416c85eab268840c18d025ca6e..3133c2f408e7291ebd0ee54f30f59600019daa50 100644 (file)
@@ -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, '']
index d1289903e78400fe1983e17afd0d387e817ed812..de64188e20b30a147a10b032c408904630e3fde2 100644 (file)
@@ -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
 
index f4e9febae0bd1c3132dbf71f7987968e8f7acbf6..2d61d4f26c1d6e1930b48455e99eb3fc6ff00032 100644 (file)
@@ -742,6 +742,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1253,
 /**/
     1252,
 /**/