aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds/highlight_spec.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-11-30 20:35:25 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-11-30 20:35:25 +0000
commit1b7b916b7631ddf73c38e3a0070d64e4636cb2f3 (patch)
treecd08258054db80bb9a11b1061bb091c70b76926a /test/functional/ex_cmds/highlight_spec.lua
parenteaa89c11d0f8aefbb512de769c6c82f61a8baca3 (diff)
parent4a8bf24ac690004aedf5540fa440e788459e5e34 (diff)
downloadrneovim-aucmd_textputpost.tar.gz
rneovim-aucmd_textputpost.tar.bz2
rneovim-aucmd_textputpost.zip
Merge remote-tracking branch 'upstream/master' into aucmd_textputpostaucmd_textputpost
Diffstat (limited to 'test/functional/ex_cmds/highlight_spec.lua')
-rw-r--r--test/functional/ex_cmds/highlight_spec.lua30
1 files changed, 29 insertions, 1 deletions
diff --git a/test/functional/ex_cmds/highlight_spec.lua b/test/functional/ex_cmds/highlight_spec.lua
index 1cd6759a53..958dd99226 100644
--- a/test/functional/ex_cmds/highlight_spec.lua
+++ b/test/functional/ex_cmds/highlight_spec.lua
@@ -3,6 +3,9 @@ local helpers = require("test.functional.helpers")(after_each)
local eq, command = helpers.eq, helpers.command
local clear = helpers.clear
local eval, exc_exec = helpers.eval, helpers.exc_exec
+local exec = helpers.exec
+local funcs = helpers.funcs
+local meths = helpers.meths
describe(':highlight', function()
local screen
@@ -21,7 +24,7 @@ describe(':highlight', function()
end)
it('invalid group name', function()
- eq('Vim(highlight):E411: highlight group not found: foo',
+ eq('Vim(highlight):E411: Highlight group not found: foo',
exc_exec("highlight foo"))
end)
@@ -36,4 +39,29 @@ describe(':highlight', function()
command('highlight normal ctermbg=red')
eq('9', eval('synIDattr(hlID("Normal"), "bg", "cterm")'))
end)
+
+ it('only the last underline style takes effect #22371', function()
+ command('highlight NonText gui=underline,undercurl')
+ eq('', eval('synIDattr(hlID("NonText"), "underline", "gui")'))
+ eq('1', eval('synIDattr(hlID("NonText"), "undercurl", "gui")'))
+ command('highlight NonText gui=undercurl,underline')
+ eq('', eval('synIDattr(hlID("NonText"), "undercurl", "gui")'))
+ eq('1', eval('synIDattr(hlID("NonText"), "underline", "gui")'))
+ end)
+
+ it('clear', function()
+ meths.set_var('colors_name', 'foo')
+ eq(1, funcs.exists('g:colors_name'))
+ command('hi clear')
+ eq(0, funcs.exists('g:colors_name'))
+ meths.set_var('colors_name', 'foo')
+ eq(1, funcs.exists('g:colors_name'))
+ exec([[
+ func HiClear()
+ hi clear
+ endfunc
+ ]])
+ funcs.HiClear()
+ eq(0, funcs.exists('g:colors_name'))
+ end)
end)