1
0
forked from aniani/vim

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)
This commit is contained in:
Bram Moolenaar
2017-04-09 22:54:13 +02:00
parent cd5c8f8250
commit f803a76978
2 changed files with 18 additions and 4 deletions

View File

@@ -280,10 +280,22 @@ func Test_set_ttytype()
set ttytype=xterm set ttytype=xterm
call assert_equal('xterm', &ttytype) call assert_equal('xterm', &ttytype)
call assert_equal(&ttytype, &term) call assert_equal(&ttytype, &term)
" FIXME: "set ttytype=" gives E522 instead of E529 " "set ttytype=" gives E522 instead of E529
" in travis on some builds. Why? Commented out this test for now. " in travis on some builds. Why? Catch both for now
" call assert_fails('set ttytype=', 'E529:') try
call assert_fails('set ttytype=xxx', 'E522:') set ttytype=
call assert_report('set ttype= did not fail')
catch /E529\|E522/
endtry
" Some systems accept any terminal name and return dumb settings,
" check for failure of finding the entry and for missing 'cm' entry.
try
set ttytype=xxx
call assert_report('set ttype=xxx did not fail')
catch /E522\|E437/
endtry
set ttytype& set ttytype&
call assert_equal(&ttytype, &term) call assert_equal(&ttytype, &term)
endif endif

View File

@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
559,
/**/ /**/
558, 558,
/**/ /**/