Patch 8.1.2015

10 views
Skip to first unread message

Bram Moolenaar

unread,
Sep 8, 2019, 4:36:19 PM9/8/19
to vim...@googlegroups.com

Patch 8.1.2015
Problem: Terminal altscreen test still fails sometimes.
Solution: Write the escape sequence in a file.
Files: src/testdir/test_terminal.vim


*** ../vim-8.1.2014/src/testdir/test_terminal.vim 2019-09-08 22:09:49.241312339 +0200
--- src/testdir/test_terminal.vim 2019-09-08 22:34:04.400755513 +0200
***************
*** 2088,2103 ****
endfunc

func Test_terminal_altscreen()
! CheckUnix

let buf = term_start(&shell, {})
!
! call term_sendkeys(buf, 'echo "\e[?1047h"' .. "\r")
call WaitForAssert({-> assert_equal(1, term_getaltscreen(buf))})

! call term_sendkeys(buf, 'echo "\e[?1047l"' .. "\r")
call WaitForAssert({-> assert_equal(0, term_getaltscreen(buf))})

call term_sendkeys(buf, "exit\r")
exe buf . "bwipe!"
endfunc
--- 2088,2109 ----
endfunc

func Test_terminal_altscreen()
! if has('win32')
! let cmd = "type Xtext\<CR>"
! else
! let cmd = "cat Xtext\<CR>"
! endif

let buf = term_start(&shell, {})
! call writefile(["\<Esc>[?1047h"], 'Xtext')
! call term_sendkeys(buf, cmd)
call WaitForAssert({-> assert_equal(1, term_getaltscreen(buf))})

! 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
*** ../vim-8.1.2014/src/version.c 2019-09-08 22:09:49.241312339 +0200
--- src/version.c 2019-09-08 22:34:52.712595783 +0200
***************
*** 759,760 ****
--- 759,762 ----
{ /* Add new patch number below this line */
+ /**/
+ 2015,
/**/

--
hundred-and-one symptoms of being an internet addict:
225. You sign up for free subscriptions for all the computer magazines

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages