comparison src/testdir/test_terminal.vim @ 19768:0d1088e3c53f v8.2.0440

patch 8.2.0440: terminal noblock test is still very flaky on BSD Commit: https://github.com/vim/vim/commit/d06dbf3f42c8a8a3967905dd2f2a31077af15438 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Mar 24 10:33:00 2020 +0100 patch 8.2.0440: terminal noblock test is still very flaky on BSD Problem: Terminal noblock test is still very flaky on BSD. Solution: Increase the waiting time.
author Bram Moolenaar <Bram@vim.org>
date Tue, 24 Mar 2020 10:45:04 +0100
parents ed157b5edad0
children 4e843fc8772f
comparison
equal deleted inserted replaced
19767:4ee37e23b782 19768:0d1088e3c53f
664 let buf = term_start(&shell) 664 let buf = term_start(&shell)
665 if has('bsd') || has('mac') || has('sun') 665 if has('bsd') || has('mac') || has('sun')
666 " The shell or something else has a problem dealing with more than 1000 666 " The shell or something else has a problem dealing with more than 1000
667 " characters at the same time. 667 " characters at the same time.
668 let len = 1000 668 let len = 1000
669 let wait_time = 15000
669 " NPFS is used in Windows, nonblocking mode does not work properly. 670 " NPFS is used in Windows, nonblocking mode does not work properly.
670 elseif has('win32') 671 elseif has('win32')
671 let len = 1 672 let len = 1
673 let wait_time = 5000
672 else 674 else
673 let len = 5000 675 let len = 5000
674 endif 676 let wait_time = 5000
675 677 endif
678
679 " Send a lot of text lines, should be buffered properly.
676 for c in split('abcdefghijklmnopqrstuvwxyz', '\zs') 680 for c in split('abcdefghijklmnopqrstuvwxyz', '\zs')
677 call term_sendkeys(buf, 'echo ' . repeat(c, len) . "\<cr>") 681 call term_sendkeys(buf, 'echo ' . repeat(c, len) . "\<cr>")
678 call term_wait(buf, 1)
679 endfor 682 endfor
680 call term_sendkeys(buf, "echo done\<cr>") 683 call term_sendkeys(buf, "echo done\<cr>")
681 684
682 " On MS-Windows there is an extra empty line below "done". Find "done" in 685 " On MS-Windows there is an extra empty line below "done". Find "done" in
683 " the last-but-one or the last-but-two line. 686 " the last-but-one or the last-but-two line.
684 let lnum = term_getsize(buf)[0] - 1 687 let lnum = term_getsize(buf)[0] - 1
685 call WaitForAssert({-> assert_match('done', term_getline(buf, lnum - 1) .. '//' .. term_getline(buf, lnum))}) 688 call WaitForAssert({-> assert_match('done', term_getline(buf, lnum - 1) .. '//' .. term_getline(buf, lnum))}, wait_time)
686 let line = term_getline(buf, lnum) 689 let line = term_getline(buf, lnum)
687 if line !~ 'done' 690 if line !~ 'done'
688 let line = term_getline(buf, lnum - 1) 691 let line = term_getline(buf, lnum - 1)
689 endif 692 endif
690 call assert_match('done', line) 693 call assert_match('done', line)