Mercurial > vim
changeset 18039:ef5720fb6f41 v8.1.2015
patch 8.1.2015: terminal altscreen test still fails sometimes
Commit: https://github.com/vim/vim/commit/bf9a3b0164e649b357d6218b4358208288b6fb7e
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 8 22:35:48 2019 +0200
patch 8.1.2015: terminal altscreen test still fails sometimes
Problem: Terminal altscreen test still fails sometimes.
Solution: Write the escape sequence in a file.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 08 Sep 2019 22:45:03 +0200 |
parents | 474da17e65dd |
children | 14ba3b14b332 |
files | src/testdir/test_terminal.vim src/version.c |
diffstat | 2 files changed, 12 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -2088,16 +2088,22 @@ func Test_terminal_getwinpos() endfunc func Test_terminal_altscreen() - CheckUnix + if has('win32') + let cmd = "type Xtext\<CR>" + else + let cmd = "cat Xtext\<CR>" + endif let buf = term_start(&shell, {}) - - call term_sendkeys(buf, 'echo "\e[?1047h"' .. "\r") + call writefile(["\<Esc>[?1047h"], 'Xtext') + call term_sendkeys(buf, cmd) call WaitForAssert({-> assert_equal(1, term_getaltscreen(buf))}) - call term_sendkeys(buf, 'echo "\e[?1047l"' .. "\r") + call writefile(["\<Esc>[?1047l"], 'Xtext') + call term_sendkeys(buf, cmd) call WaitForAssert({-> assert_equal(0, term_getaltscreen(buf))}) call term_sendkeys(buf, "exit\r") exe buf . "bwipe!" + call delete('Xtext') endfunc