Skip to content

Commit 85045a7

Browse files
committed
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.
1 parent fa0ad0b commit 85045a7

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

src/testdir/test_startup.vim

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,3 +208,16 @@ func Test_silent_ex_mode()
208208
let out = system(GetVimCommand() . '-u NONE -es -c''set verbose=1|h|exe "%norm\<c-y>\<c-d>"'' -c cq')
209209
call assert_notmatch('E315:', out)
210210
endfunc
211+
212+
func Test_default_term()
213+
if !has('unix') || has('gui_running')
214+
" can't get output of Vim.
215+
return
216+
endif
217+
218+
let save_term = $TERM
219+
let $TERM = 'unknown'
220+
let out = system(GetVimCommand() . ' -c''set term'' -c cq')
221+
call assert_match("defaulting to 'ansi'", out)
222+
let $TERM = save_term
223+
endfunc

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
538,
767769
/**/
768770
537,
769771
/**/

0 commit comments

Comments
 (0)