diff options
author | AdnoC <adam.r.cutler@gmail.com> | 2016-05-10 16:04:09 -0400 |
---|---|---|
committer | AdnoC <adam.r.cutler@gmail.com> | 2016-05-10 16:08:57 -0400 |
commit | 130a1a6bb296ce21ecb7052fe42d105852b85c59 (patch) | |
tree | 9430e3ce725f29efebc367d3756e6a16a33a810d | |
parent | e63e49d49b25837855cf9cd591dab9d811e0e360 (diff) | |
download | rneovim-130a1a6bb296ce21ecb7052fe42d105852b85c59.tar.gz rneovim-130a1a6bb296ce21ecb7052fe42d105852b85c59.tar.bz2 rneovim-130a1a6bb296ce21ecb7052fe42d105852b85c59.zip |
test/syntax: Add testing for linking to cleared highlight groups
-rw-r--r-- | test/functional/ui/highlight_spec.lua | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua index 4b0173fa89..06139277b2 100644 --- a/test/functional/ui/highlight_spec.lua +++ b/test/functional/ui/highlight_spec.lua @@ -262,4 +262,44 @@ describe('Default highlight groups', function() ]], {[1] = {bold = true, foreground = hlgroup_colors.Question}}) feed('<cr>') -- skip the "Press ENTER..." state or tests will hang end) + it('can be cleared and linked to other highlight groups', function() + execute('highlight clear ModeMsg') + feed('i') + screen:expect([[ + ^ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + -- INSERT -- | + ]], {}) + feed('<esc>') + execute('highlight CustomHLGroup guifg=red guibg=green') + execute('highlight link ModeMsg CustomHLGroup') + feed('i') + screen:expect([[ + ^ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + ~ | + {1:-- INSERT --} | + ]], {[1] = {foreground = Screen.colors.Red, background = Screen.colors.Green}}) + end) end) |