func Test_terminal_noblock()
let buf = term_start(&shell)
+ let wait_time = 5000
+ let letters = 'abcdefghijklmnopqrstuvwxyz'
if has('bsd') || has('mac') || has('sun')
" The shell or something else has a problem dealing with more than 1000
- " characters at the same time.
+ " characters at the same time. It's very slow too.
let len = 1000
let wait_time = 15000
+ let letters = 'abcdefghijklm'
" NPFS is used in Windows, nonblocking mode does not work properly.
elseif has('win32')
let len = 1
- let wait_time = 5000
else
let len = 5000
- let wait_time = 5000
endif
" Send a lot of text lines, should be buffered properly.
- for c in split('abcdefghijklmnopqrstuvwxyz', '\zs')
+ for c in split(letters, '\zs')
call term_sendkeys(buf, 'echo ' . repeat(c, len) . "\<cr>")
endfor
call term_sendkeys(buf, "echo done\<cr>")