diff options
author | James McCoy <jamessan@jamessan.com> | 2022-03-06 18:43:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-06 18:43:02 -0500 |
commit | a7c999523dbcbb91db56c6eb834034d448e9481c (patch) | |
tree | 149f746f92252f7674cdc7810d18b2846cefe89c /test/functional/terminal/highlight_spec.lua | |
parent | 40e3668e54ac6989ec2cd5454f1b245dfd2514ba (diff) | |
parent | 96bb1784a61daec4535edf291303225aa1fa01e0 (diff) | |
download | rneovim-a7c999523dbcbb91db56c6eb834034d448e9481c.tar.gz rneovim-a7c999523dbcbb91db56c6eb834034d448e9481c.tar.bz2 rneovim-a7c999523dbcbb91db56c6eb834034d448e9481c.zip |
Merge pull request #17630 from kchibisov/fix-underline-regression
fix(api): highlight attribute for underline
Diffstat (limited to 'test/functional/terminal/highlight_spec.lua')
-rw-r--r-- | test/functional/terminal/highlight_spec.lua | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/test/functional/terminal/highlight_spec.lua b/test/functional/terminal/highlight_spec.lua index ebbae1df14..ab4b4e9147 100644 --- a/test/functional/terminal/highlight_spec.lua +++ b/test/functional/terminal/highlight_spec.lua @@ -305,10 +305,17 @@ describe('synIDattr()', function() eq('79', eval('synIDattr(hlID("Keyword"), "fg")')) end) - it('returns "1" if group has "strikethrough" attribute', function() - eq('', eval('synIDattr(hlID("Normal"), "strikethrough")')) - eq('1', eval('synIDattr(hlID("Keyword"), "strikethrough")')) - eq('1', eval('synIDattr(hlID("Keyword"), "strikethrough", "gui")')) + it('returns "1" if group has given highlight attribute', function() + local hl_attrs = { + 'underline', 'underlineline', 'undercurl', 'underdot', 'underdash', 'strikethrough' + } + for _,hl_attr in ipairs(hl_attrs) do + local context = 'using ' .. hl_attr .. ' attr' + command('highlight Keyword cterm=' .. hl_attr .. ' gui=' .. hl_attr) + eq('', eval('synIDattr(hlID("Normal"), "'.. hl_attr .. '")'), context) + eq('1', eval('synIDattr(hlID("Keyword"), "' .. hl_attr .. '")'), context) + eq('1', eval('synIDattr(hlID("Keyword"), "' .. hl_attr .. '", "gui")'), context) + end end) end) |