changeset 18041:060e1b1220c6 v8.1.2016

patch 8.1.2016: terminal altscreen test now fails on MS-Windows Commit: https://github.com/vim/vim/commit/adbde3fbedd4a5379ddf0cfc9a6854b52955fd4a Author: Bram Moolenaar <Bram@vim.org> Date: Sun Sep 8 22:57:14 2019 +0200 patch 8.1.2016: terminal altscreen test now fails on MS-Windows Problem: Terminal altscreen test now fails on MS-Windows. Solution: Skip the test on MS-Windows
author Bram Moolenaar <Bram@vim.org>
date Sun, 08 Sep 2019 23:00:04 +0200
parents 14ba3b14b332
children 1616f2fc1e3c
files src/testdir/test_terminal.vim src/version.c
diffstat 2 files changed, 21 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim
+++ b/src/testdir/test_terminal.vim
@@ -321,10 +321,8 @@ func Test_terminal_scrollback()
 endfunc
 
 func Test_terminal_postponed_scrollback()
-  if !has('unix')
-    " tail -f only works on Unix
-    return
-  endif
+  " tail -f only works on Unix
+  CheckUnix
 
   call writefile(range(50), 'Xtext')
   call writefile([
@@ -740,9 +738,8 @@ endfunc
 
 func Test_terminal_special_chars()
   " this file name only works on Unix
-  if !has('unix')
-    return
-  endif
+  CheckUnix
+
   call mkdir('Xdir with spaces')
   call writefile(['x'], 'Xdir with spaces/quoted"file')
   term ls Xdir\ with\ spaces/quoted\"file
@@ -953,9 +950,7 @@ func Test_terminal_term_start_empty_comm
 endfunc
 
 func Test_terminal_response_to_control_sequence()
-  if !has('unix')
-    return
-  endif
+  CheckUnix
 
   let buf = Run_shell_in_terminal({})
   call WaitForAssert({-> assert_notequal('', term_getline(buf, 1))})
@@ -1720,9 +1715,8 @@ func Test_terminal_termwinkey()
 endfunc
 
 func Test_terminal_out_err()
-  if !has('unix')
-    return
-  endif
+  CheckUnix
+
   call writefile([
 	\ '#!/bin/sh',
 	\ 'echo "this is standard error" >&2',
@@ -1744,9 +1738,7 @@ func Test_terminal_out_err()
 endfunc
 
 func Test_terminwinscroll()
-  if !has('unix')
-    return
-  endif
+  CheckUnix
 
   " Let the terminal output more than 'termwinscroll' lines, some at the start
   " will be dropped.
@@ -1848,9 +1840,8 @@ func Test_zz2_terminal_guioptions_bang()
 endfunc
 
 func Test_terminal_hidden()
-  if !has('unix')
-    return
-  endif
+  CheckUnix
+
   term ++hidden cat
   let bnr = bufnr('$')
   call assert_equal('terminal', getbufvar(bnr, '&buftype'))
@@ -1887,9 +1878,8 @@ func Test_terminal_switch_mode()
 endfunc
 
 func Test_terminal_hidden_and_close()
-  if !has('unix')
-    return
-  endif
+  CheckUnix
+
   call assert_equal(1, winnr('$'))
   term ++hidden ++close ls
   let bnr = bufnr('$')
@@ -1933,9 +1923,8 @@ func Test_terminal_no_job()
 endfunc
 
 func Test_term_getcursor()
-  if !has('unix')
-    return
-  endif
+  CheckUnix
+
   let buf = Run_shell_in_terminal({})
 
   " Wait for the shell to display a prompt.
@@ -2024,9 +2013,8 @@ endfunc
 " 4. 0.5 sec later: redraw, including statusline (used to trigger bug)
 " 4. 0.5 sec later: should be done, clean up
 func Test_terminal_statusline()
-  if !has('unix')
-    return
-  endif
+  CheckUnix
+
   set statusline=x
   terminal
   let tbuf = bufnr('')
@@ -2088,11 +2076,9 @@ func Test_terminal_getwinpos()
 endfunc
 
 func Test_terminal_altscreen()
-  if has('win32')
-    let cmd = "type Xtext\<CR>"
-  else
-    let cmd = "cat Xtext\<CR>"
-  endif
+  " somehow doesn't work on MS-Windows
+  CheckUnix
+  let cmd = "cat Xtext\<CR>"
 
   let buf = term_start(&shell, {})
   call writefile(["\<Esc>[?1047h"], 'Xtext')
--- a/src/version.c
+++ b/src/version.c
@@ -758,6 +758,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2016,
+/**/
     2015,
 /**/
     2014,