0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.0.1452: terminal test fails on some systems

Problem:    Terminal test fails on some systems. (jonathonf)
Solution:   Use "cat" instead of Python to produce the input.  Add a delay.
            (closes #2607)
This commit is contained in:
Bram Moolenaar
2018-02-02 18:22:31 +01:00
parent 94073167e3
commit d4a282f7a5
2 changed files with 14 additions and 4 deletions

View File

@@ -815,17 +815,25 @@ func Test_terminal_response_to_control_sequence()
let buf = Run_shell_in_terminal({}) let buf = Run_shell_in_terminal({})
call term_wait(buf) call term_wait(buf)
call term_sendkeys(buf, s:python . " -c 'import sys;sys.stdout.write(\"\\x1b[6n\")'\<cr>") new
call setline(1, "\x1b[6n")
write! Xescape
bwipe
call term_sendkeys(buf, "cat Xescape\<cr>")
" wait for the response of control sequence from libvterm (and send it to tty) " wait for the response of control sequence from libvterm (and send it to tty)
call term_wait(buf, 100) sleep 200m
" wait for output from tty to display
call term_wait(buf) call term_wait(buf)
call assert_match(';\d\+R', term_getline(buf, 2))
" Wait for output from tty to display, below an empty line.
" It should show \e3;1R, but only 1R may show up
call assert_match('\<\d\+R', term_getline(buf, 3))
call term_sendkeys(buf, "\<c-c>") call term_sendkeys(buf, "\<c-c>")
call term_wait(buf) call term_wait(buf)
call Stop_shell_in_terminal(buf) call Stop_shell_in_terminal(buf)
exe buf . 'bwipe' exe buf . 'bwipe'
call delete('Xescape')
unlet g:job unlet g:job
endfunc endfunc

View File

@@ -771,6 +771,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1452,
/**/ /**/
1451, 1451,
/**/ /**/