comparison src/testdir/test_terminal.vim @ 12339:040ec95b8647 v8.0.1049

patch 8.0.1049: shell on Mac can't handle long text commit https://github.com/vim/vim/commit/d8d85bfb7d650d2fb584ea48aaaebdbc8a2e3dce Author: Bram Moolenaar <Bram@vim.org> Date: Sun Sep 3 18:08:00 2017 +0200 patch 8.0.1049: shell on Mac can't handle long text Problem: Shell on Mac can't handle long text, making terminal test fail. Solution: Only write 1000 characters instead of 5000.
author Christian Brabandt <cb@256bit.org>
date Sun, 03 Sep 2017 18:15:04 +0200
parents 44f3c9b7eec4
children 72046661f6d0
comparison
equal deleted inserted replaced
12338:210f6da3d249 12339:040ec95b8647
456 call assert_equal("", bufname(buf)) 456 call assert_equal("", bufname(buf))
457 endfunction 457 endfunction
458 458
459 func Test_terminal_noblock() 459 func Test_terminal_noblock()
460 let g:buf = term_start(&shell) 460 let g:buf = term_start(&shell)
461 if has('mac')
462 " The shell or something else has a problem dealing with more than 1000
463 " characters at the same time.
464 let len = 1000
465 else
466 let len = 5000
467 endif
461 468
462 for c in ['a','b','c','d','e','f','g','h','i','j','k'] 469 for c in ['a','b','c','d','e','f','g','h','i','j','k']
463 call term_sendkeys(g:buf, 'echo ' . repeat(c, 5000) . "\<cr>") 470 call term_sendkeys(g:buf, 'echo ' . repeat(c, len) . "\<cr>")
464 if has('mac')
465 " TODO: this should not be needed, but without it sending keys blocks
466 " after 8000 chars or so.
467 sleep 100m
468 endif
469 endfor 471 endfor
470 call term_sendkeys(g:buf, "echo done\<cr>") 472 call term_sendkeys(g:buf, "echo done\<cr>")
471 473
472 " On MS-Windows there is an extra empty line below "done". Find "done" in 474 " On MS-Windows there is an extra empty line below "done". Find "done" in
473 " the last-but-one or the last-but-two line. 475 " the last-but-one or the last-but-two line.