aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/highlight_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/ui/highlight_spec.lua')
-rw-r--r--test/functional/ui/highlight_spec.lua40
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)