]> granicus.if.org Git - vim/commitdiff
patch 8.0.1549: various small problems in test files v8.0.1549
authorBram Moolenaar <Bram@vim.org>
Tue, 27 Feb 2018 16:17:42 +0000 (17:17 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 27 Feb 2018 16:17:42 +0000 (17:17 +0100)
Problem:    Various small problems in test files.
Solution:   Include small changes.

src/testdir/shared.vim
src/testdir/test_channel.py
src/testdir/test_gui.vim
src/testdir/test_gui_init.vim
src/testdir/test_vimscript.vim
src/version.c

index b16fdce3e8246d794e9e77d9a510071f9f5b5500..ef85514004a462fa3a36e99d7f57d255f2ee140a 100644 (file)
@@ -115,6 +115,7 @@ endfunc
 
 " Wait for up to a second for "expr" to become true.  "expr" can be a
 " stringified expression to evaluate, or a funcref without arguments.
+" A second argument can be used to specify a different timeout in msec.
 "
 " Return time slept in milliseconds.  With the +reltime feature this can be
 " more than the actual waiting time.  Without +reltime it can also be less.
index 6668752c4266ce05351ad94294bc0a288bc9e697..bafa9dbf765c6c297a50717853481df7ce9de1e7 100644 (file)
@@ -62,6 +62,39 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler):
                     if decoded[1] == 'hello!':
                         # simply send back a string
                         response = "got it"
+                    elif decoded[1] == 'malformed1':
+                        cmd = '["ex",":"]wrong!["ex","smi"]'
+                        print("sending: {0}".format(cmd))
+                        self.request.sendall(cmd.encode('utf-8'))
+                        response = "ok"
+                        # Need to wait for Vim to give up, otherwise it
+                        # sometimes fails on OS X.
+                        time.sleep(0.2)
+                    elif decoded[1] == 'malformed2':
+                        cmd = '"unterminated string'
+                        print("sending: {0}".format(cmd))
+                        self.request.sendall(cmd.encode('utf-8'))
+                        response = "ok"
+                        # Need to wait for Vim to give up, otherwise the double
+                        # quote in the "ok" response terminates the string.
+                        time.sleep(0.2)
+                    elif decoded[1] == 'malformed3':
+                        cmd = '["ex","missing ]"'
+                        print("sending: {0}".format(cmd))
+                        self.request.sendall(cmd.encode('utf-8'))
+                        response = "ok"
+                        # Need to wait for Vim to give up, otherwise the ]
+                        # in the "ok" response terminates the list.
+                        time.sleep(0.2)
+                    elif decoded[1] == 'split':
+                        cmd = '["ex","let '
+                        print("sending: {0}".format(cmd))
+                        self.request.sendall(cmd.encode('utf-8'))
+                        time.sleep(0.01)
+                        cmd = 'g:split = 123"]'
+                        print("sending: {0}".format(cmd))
+                        self.request.sendall(cmd.encode('utf-8'))
+                        response = "ok"
                     elif decoded[1].startswith("echo "):
                         # send back the argument
                         response = decoded[1][5:]
@@ -121,39 +154,6 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler):
                         print("sending: {0}".format(cmd))
                         self.request.sendall(cmd.encode('utf-8'))
                         response = "ok"
-                    elif decoded[1] == 'malformed1':
-                        cmd = '["ex",":"]wrong!["ex","smi"]'
-                        print("sending: {0}".format(cmd))
-                        self.request.sendall(cmd.encode('utf-8'))
-                        response = "ok"
-                        # Need to wait for Vim to give up, otherwise it
-                        # sometimes fails on OS X.
-                        time.sleep(0.2)
-                    elif decoded[1] == 'malformed2':
-                        cmd = '"unterminated string'
-                        print("sending: {0}".format(cmd))
-                        self.request.sendall(cmd.encode('utf-8'))
-                        response = "ok"
-                        # Need to wait for Vim to give up, otherwise the double
-                        # quote in the "ok" response terminates the string.
-                        time.sleep(0.2)
-                    elif decoded[1] == 'malformed3':
-                        cmd = '["ex","missing ]"'
-                        print("sending: {0}".format(cmd))
-                        self.request.sendall(cmd.encode('utf-8'))
-                        response = "ok"
-                        # Need to wait for Vim to give up, otherwise the ]
-                        # in the "ok" response terminates the list.
-                        time.sleep(0.2)
-                    elif decoded[1] == 'split':
-                        cmd = '["ex","let '
-                        print("sending: {0}".format(cmd))
-                        self.request.sendall(cmd.encode('utf-8'))
-                        time.sleep(0.01)
-                        cmd = 'g:split = 123"]'
-                        print("sending: {0}".format(cmd))
-                        self.request.sendall(cmd.encode('utf-8'))
-                        response = "ok"
                     elif decoded[1] == 'an expr':
                         # Send an expr request.
                         cmd = '["expr","setline(\\"$\\", [\\"one\\",\\"two\\",\\"three\\"])"]'
index 427bab702cde2ef5c460cc9be228d853379ef0b1..50a629b2ee26ff9120f2a6de0d06170b0f6e0189 100644 (file)
@@ -16,7 +16,7 @@ func TearDown()
 endfunc
 
 " Test for resetting "secure" flag after GUI has started.
-" Must be run first.
+" Must be run first, since it starts the GUI on Unix.
 func Test_1_set_secure()
   set exrc secure
   gui -f
index 661bf0ce693f20b686f0d763ebf6f2be81c54ae8..638708f4f1e7a0c62da5fb9b9d321b15649942d8 100644 (file)
@@ -17,7 +17,7 @@ func TearDown()
 endfunc
 
 " Ignore the "failed to create input context" error.
-call test_ignore_error('E285')
+call test_ignore_error('E285:')
 
 " Start the GUI now, in the foreground.
 gui -f
index d653fa594fb477f94e97cd2172a3612a78835a11..fc002c2ab0757be0c91a36919bf7d70b722c5d37 100644 (file)
@@ -1,4 +1,4 @@
-" Test various aspects of the Vim language.
+" Test various aspects of the Vim script language.
 " Most of this was formerly in test49.
 
 "-------------------------------------------------------------------------------
index d6c17ecf7531ae4103a5c838f578e0dba17bfc9e..f5ffe20ac626c1ddf2659dbe613988b030118afb 100644 (file)
@@ -778,6 +778,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1549,
 /**/
     1548,
 /**/