From d4a282f7a5efb2bf28fbd947251e512f08563738 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 2 Feb 2018 18:22:31 +0100 Subject: [PATCH] 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) --- src/testdir/test_terminal.vim | 16 ++++++++++++---- src/version.c | 2 ++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/testdir/test_terminal.vim b/src/testdir/test_terminal.vim index 853c69c30..18d2815fb 100644 --- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -815,17 +815,25 @@ func Test_terminal_response_to_control_sequence() let buf = Run_shell_in_terminal({}) call term_wait(buf) - call term_sendkeys(buf, s:python . " -c 'import sys;sys.stdout.write(\"\\x1b[6n\")'\") + new + call setline(1, "\x1b[6n") + write! Xescape + bwipe + call term_sendkeys(buf, "cat Xescape\") + " wait for the response of control sequence from libvterm (and send it to tty) - call term_wait(buf, 100) - " wait for output from tty to display + sleep 200m 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, "\") call term_wait(buf) call Stop_shell_in_terminal(buf) exe buf . 'bwipe' + call delete('Xescape') unlet g:job endfunc diff --git a/src/version.c b/src/version.c index e01f2be79..054949439 100644 --- a/src/version.c +++ b/src/version.c @@ -771,6 +771,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1452, /**/ 1451, /**/