Mercurial > vim
comparison src/testdir/test_terminal.vim @ 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 | fe0cec169589 |
children | 43bd8bad22b6 |
comparison
equal
deleted
inserted
replaced
13155:c3034ab21387 | 13156:36c503100cb3 |
---|---|
813 endif | 813 endif |
814 | 814 |
815 let buf = Run_shell_in_terminal({}) | 815 let buf = Run_shell_in_terminal({}) |
816 call term_wait(buf) | 816 call term_wait(buf) |
817 | 817 |
818 call term_sendkeys(buf, s:python . " -c 'import sys;sys.stdout.write(\"\\x1b[6n\")'\<cr>") | 818 new |
819 call setline(1, "\x1b[6n") | |
820 write! Xescape | |
821 bwipe | |
822 call term_sendkeys(buf, "cat Xescape\<cr>") | |
823 | |
819 " wait for the response of control sequence from libvterm (and send it to tty) | 824 " wait for the response of control sequence from libvterm (and send it to tty) |
820 call term_wait(buf, 100) | 825 sleep 200m |
821 " wait for output from tty to display | 826 call term_wait(buf) |
822 call term_wait(buf) | 827 |
823 call assert_match(';\d\+R', term_getline(buf, 2)) | 828 " Wait for output from tty to display, below an empty line. |
829 " It should show \e3;1R, but only 1R may show up | |
830 call assert_match('\<\d\+R', term_getline(buf, 3)) | |
824 | 831 |
825 call term_sendkeys(buf, "\<c-c>") | 832 call term_sendkeys(buf, "\<c-c>") |
826 call term_wait(buf) | 833 call term_wait(buf) |
827 call Stop_shell_in_terminal(buf) | 834 call Stop_shell_in_terminal(buf) |
828 | 835 |
829 exe buf . 'bwipe' | 836 exe buf . 'bwipe' |
830 unlet g:job | 837 call delete('Xescape') |
831 endfunc | 838 unlet g:job |
839 endfunc |