]> granicus.if.org Git - vim/commitdiff
patch 8.0.0538: no test for falling back to default term value v8.0.0538
authorBram Moolenaar <Bram@vim.org>
Sun, 2 Apr 2017 14:54:09 +0000 (16:54 +0200)
committerBram Moolenaar <Bram@vim.org>
Sun, 2 Apr 2017 14:54:09 +0000 (16:54 +0200)
Problem:    No test for falling back to default term value.
Solution:   Add a test.

src/testdir/test_startup.vim
src/version.c

index 2b003c7cf8d0c005bbb6fadf9c2f60c2676af812..2185b4dc206a8a2b5e4293f787901a909c58a8b4 100644 (file)
@@ -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
index dc7cfb53cf58affd7329ca9cb3f7e1e774ea5ae9..8de7e66848b6bec64860e94a3e46edba4dba9d41 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    538,
 /**/
     537,
 /**/