mirror of
https://github.com/vim/vim.git
synced 2025-10-02 05:04:20 -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:
@@ -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\\"])"]'
|
||||
|
Reference in New Issue
Block a user