vim-patch:8.2.2375: test for RGB color skipped in the terminal

Problem:    Test for RGB color skipped in the terminal.
Solution:   Run the GUI if possible.
09fbedc8dc

Cherry-pick Test_highlight_RGB_color() from patch v8.2.1077
to port this patch.
This commit is contained in:
Jan Edmund Lazo 2021-01-21 23:25:52 -05:00
parent 4bd7f1133b
commit b8ea076ad1
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15

View File

@ -2,6 +2,7 @@
source view_util.vim source view_util.vim
source screendump.vim source screendump.vim
source check.vim
func Test_highlight() func Test_highlight()
" basic test if ":highlight" doesn't crash " basic test if ":highlight" doesn't crash
@ -610,3 +611,16 @@ func Test_1_highlight_Normalgroup_exists()
call assert_match('hi Normal\s*font=.*', hlNormal) call assert_match('hi Normal\s*font=.*', hlNormal)
endif endif
endfunc endfunc
" Test for using RGB color values in a highlight group
func Test_xxlast_highlight_RGB_color()
CheckCanRunGui
gui -f
hi MySearch guifg=#110000 guibg=#001100 guisp=#000011
call assert_equal('#110000', synIDattr(synIDtrans(hlID('MySearch')), 'fg#'))
call assert_equal('#001100', synIDattr(synIDtrans(hlID('MySearch')), 'bg#'))
call assert_equal('#000011', synIDattr(synIDtrans(hlID('MySearch')), 'sp#'))
hi clear
endfunc
" vim: shiftwidth=2 sts=2 expandtab