summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_channel.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-01-24 23:11:49 +0100
committerBram Moolenaar <Bram@vim.org>2019-01-24 23:11:49 +0100
commit240583869ae477202494dd01ef1e8e2bac650f10 (patch)
tree11fc0b707bd3d9c5dba5da5f706b413373cf0824 /src/testdir/test_channel.vim
parent99531a7604ce89ba82f41cdb519669abb61f3df0 (diff)
patch 8.1.0818: MS-Windows: cannot send large data with ch_sendraw()v8.1.0818
Problem: MS-Windows: cannot send large data with ch_sendraw(). Solution: Split write into several WriteFile() calls. (Yasuhiro Matsumoto, closes #3823)
Diffstat (limited to 'src/testdir/test_channel.vim')
-rw-r--r--src/testdir/test_channel.vim18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim
index 15ca9ddbb5..e7fcf95826 100644
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -1980,3 +1980,21 @@ func Test_job_start_in_timer()
unlet! g:val
unlet! g:job
endfunc
+
+func Test_raw_large_data()
+ try
+ let g:out = ''
+ let job = job_start(s:python . " test_channel_pipe.py",
+ \ {'mode': 'raw', 'drop': 'never', 'noblock': 1,
+ \ 'callback': {ch, msg -> execute('let g:out .= msg')}})
+
+ let want = repeat('X', 79999) . "\n"
+ call ch_sendraw(job, want)
+ let g:Ch_job = job
+ call WaitForAssert({-> assert_equal("dead", job_status(g:Ch_job))})
+ call assert_equal(want, substitute(g:out, '\r', '', 'g'))
+ finally
+ call job_stop(job)
+ unlet g:out
+ endtry
+endfunc