mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 8.0.1549: various small problems in test files
Problem: Various small problems in test files. Solution: Include small changes.
This commit is contained in:
@@ -115,6 +115,7 @@ endfunc
|
|||||||
|
|
||||||
" Wait for up to a second for "expr" to become true. "expr" can be a
|
" Wait for up to a second for "expr" to become true. "expr" can be a
|
||||||
" stringified expression to evaluate, or a funcref without arguments.
|
" 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
|
" 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.
|
" more than the actual waiting time. Without +reltime it can also be less.
|
||||||
|
@@ -62,6 +62,39 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler):
|
|||||||
if decoded[1] == 'hello!':
|
if decoded[1] == 'hello!':
|
||||||
# simply send back a string
|
# simply send back a string
|
||||||
response = "got it"
|
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 "):
|
elif decoded[1].startswith("echo "):
|
||||||
# send back the argument
|
# send back the argument
|
||||||
response = decoded[1][5:]
|
response = decoded[1][5:]
|
||||||
@@ -121,39 +154,6 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler):
|
|||||||
print("sending: {0}".format(cmd))
|
print("sending: {0}".format(cmd))
|
||||||
self.request.sendall(cmd.encode('utf-8'))
|
self.request.sendall(cmd.encode('utf-8'))
|
||||||
response = "ok"
|
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':
|
elif decoded[1] == 'an expr':
|
||||||
# Send an expr request.
|
# Send an expr request.
|
||||||
cmd = '["expr","setline(\\"$\\", [\\"one\\",\\"two\\",\\"three\\"])"]'
|
cmd = '["expr","setline(\\"$\\", [\\"one\\",\\"two\\",\\"three\\"])"]'
|
||||||
|
@@ -16,7 +16,7 @@ func TearDown()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Test for resetting "secure" flag after GUI has started.
|
" 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()
|
func Test_1_set_secure()
|
||||||
set exrc secure
|
set exrc secure
|
||||||
gui -f
|
gui -f
|
||||||
|
@@ -17,7 +17,7 @@ func TearDown()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" Ignore the "failed to create input context" error.
|
" 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.
|
" Start the GUI now, in the foreground.
|
||||||
gui -f
|
gui -f
|
||||||
|
@@ -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.
|
" Most of this was formerly in test49.
|
||||||
|
|
||||||
"-------------------------------------------------------------------------------
|
"-------------------------------------------------------------------------------
|
||||||
|
@@ -778,6 +778,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1549,
|
||||||
/**/
|
/**/
|
||||||
1548,
|
1548,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user