diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-01-21 23:25:52 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-01-21 23:35:30 -0500 |
commit | b8ea076ad116ff2639bebbde3283ac025fb9acb3 (patch) | |
tree | 71b91a579b198fb6c25517c32ff8f8d2fc3bb940 /src | |
parent | 4bd7f1133ba8dabe4953144db001ca417afebb8e (diff) | |
download | rneovim-b8ea076ad116ff2639bebbde3283ac025fb9acb3.tar.gz rneovim-b8ea076ad116ff2639bebbde3283ac025fb9acb3.tar.bz2 rneovim-b8ea076ad116ff2639bebbde3283ac025fb9acb3.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/testdir/test_highlight.vim | 14 |
1 files changed, 14 insertions, 0 deletions
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 |