changeset 11305:3bcdfad55b19 v8.0.0538

patch 8.0.0538: no test for falling back to default term value commit https://github.com/vim/vim/commit/85045a73db258a054a17fd52a67eb5cd02a788dc Author: Bram Moolenaar <Bram@vim.org> Date: Sun Apr 2 16:54:09 2017 +0200 patch 8.0.0538: no test for falling back to default term value Problem: No test for falling back to default term value. Solution: Add a test.
author Christian Brabandt <cb@256bit.org>
date Sun, 02 Apr 2017 17:00:04 +0200
parents edfac45a053d
children 992807fb66f3
files src/testdir/test_startup.vim src/version.c
diffstat 2 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_startup.vim
+++ b/src/testdir/test_startup.vim
@@ -208,3 +208,16 @@ func Test_silent_ex_mode()
   let out = system(GetVimCommand() . '-u NONE -es -c''set verbose=1|h|exe "%norm\<c-y>\<c-d>"'' -c cq')
   call assert_notmatch('E315:', out)
 endfunc
+
+func Test_default_term()
+  if !has('unix') || has('gui_running')
+    " can't get output of Vim.
+    return
+  endif
+
+  let save_term = $TERM
+  let $TERM = 'unknown'
+  let out = system(GetVimCommand() . ' -c''set term'' -c cq')
+  call assert_match("defaulting to 'ansi'", out)
+  let $TERM = save_term
+endfunc
--- a/src/version.c
+++ b/src/version.c
@@ -765,6 +765,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    538,
+/**/
     537,
 /**/
     536,