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.
diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim
index 2b003c7..2185b4d 100644
--- a/src/testdir/test_startup.vim
+++ b/src/testdir/test_startup.vim
@@ -208,3 +208,16 @@
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