Skip to content

Commit f803a76

Browse files
committed
patch 8.0.0559: setting ttytype to xxx does not always fail
Problem: Setting ttytype to xxx does not always fail as expected. (Marvin Schmidt) Solution: Catch both possible errors. (closes #1601)
1 parent cd5c8f8 commit f803a76

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

src/testdir/test_options.vim

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,22 @@ func Test_set_ttytype()
280280
set ttytype=xterm
281281
call assert_equal('xterm', &ttytype)
282282
call assert_equal(&ttytype, &term)
283-
" FIXME: "set ttytype=" gives E522 instead of E529
284-
" in travis on some builds. Why? Commented out this test for now.
285-
" call assert_fails('set ttytype=', 'E529:')
286-
call assert_fails('set ttytype=xxx', 'E522:')
283+
" "set ttytype=" gives E522 instead of E529
284+
" in travis on some builds. Why? Catch both for now
285+
try
286+
set ttytype=
287+
call assert_report('set ttype= did not fail')
288+
catch /E529\|E522/
289+
endtry
290+
291+
" Some systems accept any terminal name and return dumb settings,
292+
" check for failure of finding the entry and for missing 'cm' entry.
293+
try
294+
set ttytype=xxx
295+
call assert_report('set ttype=xxx did not fail')
296+
catch /E522\|E437/
297+
endtry
298+
287299
set ttytype&
288300
call assert_equal(&ttytype, &term)
289301
endif

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+
559,
767769
/**/
768770
558,
769771
/**/

0 commit comments

Comments
 (0)