From b8ea076ad116ff2639bebbde3283ac025fb9acb3 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Thu, 21 Jan 2021 23:25:52 -0500 Subject: 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. https://github.com/vim/vim/commit/09fbedc8dc3adc0a7adf2093916911e633cfa626 Cherry-pick Test_highlight_RGB_color() from patch v8.2.1077 to port this patch. --- src/nvim/testdir/test_highlight.vim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src') diff --git a/src/nvim/testdir/test_highlight.vim b/src/nvim/testdir/test_highlight.vim index 8f6834c2ab..4cc4d775d1 100644 --- a/src/nvim/testdir/test_highlight.vim +++ b/src/nvim/testdir/test_highlight.vim @@ -2,6 +2,7 @@ source view_util.vim source screendump.vim +source check.vim func Test_highlight() " 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) endif 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 -- cgit