mirror of
https://github.com/vim/vim.git
synced 2025-11-13 22:54:27 -05:00
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.
This commit is contained in:
@@ -2088,16 +2088,22 @@ func Test_terminal_getwinpos()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_terminal_altscreen()
|
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, {})
|
let buf = term_start(&shell, {})
|
||||||
|
call writefile(["\<Esc>[?1047h"], 'Xtext')
|
||||||
call term_sendkeys(buf, 'echo "\e[?1047h"' .. "\r")
|
call term_sendkeys(buf, cmd)
|
||||||
call WaitForAssert({-> assert_equal(1, term_getaltscreen(buf))})
|
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 WaitForAssert({-> assert_equal(0, term_getaltscreen(buf))})
|
||||||
|
|
||||||
call term_sendkeys(buf, "exit\r")
|
call term_sendkeys(buf, "exit\r")
|
||||||
exe buf . "bwipe!"
|
exe buf . "bwipe!"
|
||||||
|
call delete('Xtext')
|
||||||
endfunc
|
endfunc
|
||||||
|
|||||||
@@ -757,6 +757,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 */
|
||||||
|
/**/
|
||||||
|
2015,
|
||||||
/**/
|
/**/
|
||||||
2014,
|
2014,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user