Mercurial > vim
comparison src/testdir/test_channel.vim @ 15621:bfbdef46aa7d v8.1.0818
patch 8.1.0818: MS-Windows: cannot send large data with ch_sendraw()
commit https://github.com/vim/vim/commit/240583869ae477202494dd01ef1e8e2bac650f10
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jan 24 23:11:49 2019 +0100
patch 8.1.0818: MS-Windows: cannot send large data with ch_sendraw()
Problem: MS-Windows: cannot send large data with ch_sendraw().
Solution: Split write into several WriteFile() calls. (Yasuhiro Matsumoto,
closes #3823)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 24 Jan 2019 23:15:05 +0100 |
parents | 3137345451a4 |
children | 858bf9c80c93 |
comparison
equal
deleted
inserted
replaced
15620:327925217fe3 | 15621:bfbdef46aa7d |
---|---|
1978 delfunc ExitCb | 1978 delfunc ExitCb |
1979 delfunc TimerCb | 1979 delfunc TimerCb |
1980 unlet! g:val | 1980 unlet! g:val |
1981 unlet! g:job | 1981 unlet! g:job |
1982 endfunc | 1982 endfunc |
1983 | |
1984 func Test_raw_large_data() | |
1985 try | |
1986 let g:out = '' | |
1987 let job = job_start(s:python . " test_channel_pipe.py", | |
1988 \ {'mode': 'raw', 'drop': 'never', 'noblock': 1, | |
1989 \ 'callback': {ch, msg -> execute('let g:out .= msg')}}) | |
1990 | |
1991 let want = repeat('X', 79999) . "\n" | |
1992 call ch_sendraw(job, want) | |
1993 let g:Ch_job = job | |
1994 call WaitForAssert({-> assert_equal("dead", job_status(g:Ch_job))}) | |
1995 call assert_equal(want, substitute(g:out, '\r', '', 'g')) | |
1996 finally | |
1997 call job_stop(job) | |
1998 unlet g:out | |
1999 endtry | |
2000 endfunc |