0
0
mirror of https://github.com/vim/vim.git synced 2025-10-06 05:44:14 -04:00

patch 8.2.3220: Test_term_setansicolors() fails in some configurations

Problem:    Test_term_setansicolors() fails in some configurations.
Solution:   Check available features. (Dominique Pellé, closes #8636)
This commit is contained in:
Dominique Pelle
2021-07-25 15:41:44 +02:00
committed by Bram Moolenaar
parent 7a4ca32175
commit 2ec28aec9d
2 changed files with 9 additions and 2 deletions

View File

@@ -3352,8 +3352,13 @@ enddef
def Test_term_setansicolors()
CheckRunVimInTerminal
CheckDefAndScriptFailure2(['term_setansicolors([], "p")'], 'E1013: Argument 1: type mismatch, expected string but got list<unknown>', 'E1174: String required for argument 1')
CheckDefAndScriptFailure2(['term_setansicolors(10, {})'], 'E1013: Argument 2: type mismatch, expected list<any> but got dict<unknown>', 'E1211: List required for argument 2')
if has('termguicolors') || has('gui')
CheckDefAndScriptFailure2(['term_setansicolors([], "p")'], 'E1013: Argument 1: type mismatch, expected string but got list<unknown>', 'E1174: String required for argument 1')
CheckDefAndScriptFailure2(['term_setansicolors(10, {})'], 'E1013: Argument 2: type mismatch, expected list<any> but got dict<unknown>', 'E1211: List required for argument 2')
else
throw 'Skipped: Only works with termguicolors or gui feature'
endif
enddef
def Test_term_setapi()

View File

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