diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-02-05 23:09:12 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-02-05 23:09:12 +0100 |
commit | f416086f264c1d998863b2e600f4c14f799d0d99 (patch) | |
tree | 12b1dcfe3f31e6c5e03af8bf1ab2431a586ecae9 /src/testdir/test_channel.py | |
parent | 6076fe1986255d32b7a078a28bf9e7bea19d6f30 (diff) | |
download | vim-git-f416086f264c1d998863b2e600f4c14f799d0d99.tar.gz |
patch 7.4.1265v7.4.1265
Problem: Not all channel commands are tested.
Solution: Add a test for "normal", "expr" and "redraw".
Diffstat (limited to 'src/testdir/test_channel.py')
-rw-r--r-- | src/testdir/test_channel.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/testdir/test_channel.py b/src/testdir/test_channel.py index 66b8c5e66..d8830c519 100644 --- a/src/testdir/test_channel.py +++ b/src/testdir/test_channel.py @@ -75,6 +75,12 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler): print("sending: {}".format(cmd)) self.request.sendall(cmd.encode('utf-8')) response = "ok" + elif decoded[1] == 'do normal': + # Send a normal command. + cmd = '["normal","G$s more\u001b"]' + print("sending: {}".format(cmd)) + self.request.sendall(cmd.encode('utf-8')) + response = "ok" elif decoded[1] == 'eval-works': # Send an eval request. We ignore the response. cmd = '["eval","\\"foo\\" . 123", -1]' @@ -93,6 +99,22 @@ class ThreadedTCPRequestHandler(socketserver.BaseRequestHandler): print("sending: {}".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\\"])"]' + print("sending: {}".format(cmd)) + self.request.sendall(cmd.encode('utf-8')) + response = "ok" + elif decoded[1] == 'redraw': + cmd = '["redraw",""]' + print("sending: {}".format(cmd)) + self.request.sendall(cmd.encode('utf-8')) + response = "ok" + elif decoded[1] == 'redraw!': + cmd = '["redraw","force"]' + print("sending: {}".format(cmd)) + self.request.sendall(cmd.encode('utf-8')) + response = "ok" elif decoded[1] == 'empty-request': cmd = '[]' print("sending: {}".format(cmd)) |