Mercurial > vim
changeset 13156:36c503100cb3 v8.0.1452
patch 8.0.1452: terminal test fails on some systems
commit https://github.com/vim/vim/commit/d4a282f7a5efb2bf28fbd947251e512f08563738
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Feb 2 18:22:31 2018 +0100
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 02 Feb 2018 18:30:06 +0100 |
parents | c3034ab21387 |
children | c2a20b4e3e4f |
files | src/testdir/test_terminal.vim src/version.c |
diffstat | 2 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -815,17 +815,25 @@ func Test_terminal_response_to_control_s let buf = Run_shell_in_terminal({}) 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) - 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, "\<c-c>") call term_wait(buf) call Stop_shell_in_terminal(buf) exe buf . 'bwipe' + call delete('Xescape') unlet g:job endfunc