diff src/testdir/test_channel.vim @ 9969:176e34b0d678 v7.4.2258

commit https://github.com/vim/vim/commit/f1f0792e55e72cdc7c833b30f565a9b02f18bb1e Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 26 17:58:53 2016 +0200 patch 7.4.2258 Problem: Two JSON messages are sent without a separator. Solution: Separate messages with a NL. (closes https://github.com/vim/vim/issues/1001)
author Christian Brabandt <cb@256bit.org>
date Fri, 26 Aug 2016 18:00:08 +0200
parents 219dbe63ad2a
children 01c3f981ce08
line wrap: on
line diff
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -55,6 +55,17 @@ func Ch_communicate(port)
   call WaitFor('exists("g:split")')
   call assert_equal(123, g:split)
 
+  " string with ][ should work
+  call assert_equal('this][that', ch_evalexpr(handle, 'echo this][that'))
+
+  " sending three messages quickly then reading should work
+  for i in range(3)
+    call ch_sendexpr(handle, 'echo hello ' . i)
+  endfor
+  call assert_equal('hello 0', ch_read(handle)[1])
+  call assert_equal('hello 1', ch_read(handle)[1])
+  call assert_equal('hello 2', ch_read(handle)[1])
+
   " Request that triggers sending two ex commands.  These will usually be
   " handled before getting the response, but it's not guaranteed, thus wait a
   " tiny bit for the commands to get executed.