diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-02-06 21:56:09 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-02-06 21:56:09 +0100 |
commit | 88989cc381c764978f7d7c8e387f3efc21333b4b (patch) | |
tree | 6e21020d48604772c0e4ea94d690f9f569dc9557 /src/testdir/test_channel_pipe.py | |
parent | 544d3bc9f0e494cb712a33b61558b8e8e12b1e0b (diff) |
patch 8.0.0312: failure when a channel receives a split json messagev8.0.0312
Problem: When a json message arrives in pieces, the start is dropped and
the decoding fails.
Solution: Do not drop the start when it is still needed. (Kay Zheng) Add a
test. Reset the timeout when something is received.
Diffstat (limited to 'src/testdir/test_channel_pipe.py')
-rw-r--r-- | src/testdir/test_channel_pipe.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/testdir/test_channel_pipe.py b/src/testdir/test_channel_pipe.py index 639cc6c266..a67a81a853 100644 --- a/src/testdir/test_channel_pipe.py +++ b/src/testdir/test_channel_pipe.py @@ -29,6 +29,11 @@ if __name__ == "__main__": if typed.startswith("echo "): print(typed[5:-1]) sys.stdout.flush() + if typed.startswith("echosplit "): + for part in typed[10:-1].split('|'): + sys.stdout.write(part) + sys.stdout.flush() + time.sleep(0.05) if typed.startswith("double "): print(typed[7:-1] + "\nAND " + typed[7:-1]) sys.stdout.flush() |