diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 21:52:58 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 21:52:58 +0000 |
commit | 931bffbda3668ddc609fc1da8f9eb576b170aa52 (patch) | |
tree | d8c1843a95da5ea0bb4acc09f7e37843d9995c86 /test/functional/ex_cmds/highlight_spec.lua | |
parent | 142d9041391780ac15b89886a54015fdc5c73995 (diff) | |
parent | 4a8bf24ac690004aedf5540fa440e788459e5e34 (diff) | |
download | rneovim-userreg.tar.gz rneovim-userreg.tar.bz2 rneovim-userreg.zip |
Merge remote-tracking branch 'upstream/master' into userreguserreg
Diffstat (limited to 'test/functional/ex_cmds/highlight_spec.lua')
-rw-r--r-- | test/functional/ex_cmds/highlight_spec.lua | 30 |
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) |