diff src/testdir/test_channel.vim @ 8655:1eb302bf2475 v7.4.1617

commit https://github.com/vim/vim/commit/ba61ac0d61f46de7d29c64bb0de6d25c2e378be0 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Mar 20 16:40:37 2016 +0100 patch 7.4.1617 Problem: When a JSON message is split it isn't decoded. Solution: Wait a short time for the rest of the message to arrive.
author Christian Brabandt <cb@256bit.org>
date Sun, 20 Mar 2016 16:45:04 +0100
parents d80edead9675
children 06848fe9c816
line wrap: on
line diff
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -127,7 +127,14 @@ func s:communicate(port)
   call assert_equal('got it', ch_evalexpr(handle, 'hello!'))
 
   " Malformed command should be ignored.
-  call assert_equal('ok', ch_evalexpr(handle, 'malformed'))
+  call assert_equal('ok', ch_evalexpr(handle, 'malformed1'))
+  call assert_equal('ok', ch_evalexpr(handle, 'malformed2'))
+  call assert_equal('ok', ch_evalexpr(handle, 'malformed3'))
+
+  " split command should work
+  call assert_equal('ok', ch_evalexpr(handle, 'split'))
+  call s:waitFor('exists("g:split")')
+  call assert_equal(123, g:split)
 
   " Request that triggers sending two ex commands.  These will usually be
   " handled before getting the response, but it's not guaranteed, thus wait a