]> granicus.if.org Git - vim/commitdiff
patch 8.1.2015: terminal altscreen test still fails sometimes v8.1.2015
authorBram Moolenaar <Bram@vim.org>
Sun, 8 Sep 2019 20:35:48 +0000 (22:35 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 8 Sep 2019 20:35:48 +0000 (22:35 +0200)
Problem:    Terminal altscreen test still fails sometimes.
Solution:   Write the escape sequence in a file.

src/testdir/test_terminal.vim
src/version.c

index 82459f85db8c7b802bea8329130442327c1205f8..42b89fc9efc669bdfcb3ab81770ef5e47b43e2e7 100644 (file)
@@ -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
index 448407fdf4646efb7bd6b9f6e73fea3c841a3ea8..962f0a9a971a90a7659707b7d69aad53b359293c 100644 (file)
@@ -757,6 +757,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2015,
 /**/
     2014,
 /**/