diff options
author | Munif Tanjim <hello@muniftanjim.dev> | 2022-07-31 17:38:00 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-31 13:38:00 +0200 |
commit | 86110ec93303a80ea14561d3976214ca27f0be63 (patch) | |
tree | b9e28655ba7034dffb4682437e5547a0bfafe307 /test/functional/api/highlight_spec.lua | |
parent | 380417c1ddbd90b084ed27f321b575de34998a9b (diff) | |
download | rneovim-86110ec93303a80ea14561d3976214ca27f0be63.tar.gz rneovim-86110ec93303a80ea14561d3976214ca27f0be63.tar.bz2 rneovim-86110ec93303a80ea14561d3976214ca27f0be63.zip |
fix(highlight): add missing 'nocombine' to nvim_get_hl_* apis (#19586)
Diffstat (limited to 'test/functional/api/highlight_spec.lua')
-rw-r--r-- | test/functional/api/highlight_spec.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/functional/api/highlight_spec.lua b/test/functional/api/highlight_spec.lua index 933103046c..c4197f0b3e 100644 --- a/test/functional/api/highlight_spec.lua +++ b/test/functional/api/highlight_spec.lua @@ -34,6 +34,7 @@ describe('API: highlight',function() underdotted = true, underdashed = true, strikethrough = true, + nocombine = true, } before_each(function() @@ -55,7 +56,7 @@ describe('API: highlight',function() eq('Invalid highlight id: 30000', string.match(emsg, 'Invalid.*')) -- Test all highlight properties. - command('hi NewHighlight gui=underline,bold,undercurl,underdouble,underdotted,underdashed,italic,reverse,strikethrough') + command('hi NewHighlight gui=underline,bold,undercurl,underdouble,underdotted,underdashed,italic,reverse,strikethrough,nocombine') eq(expected_rgb2, nvim("get_hl_by_id", hl_id, true)) -- Test nil argument. @@ -136,10 +137,10 @@ describe('API: highlight',function() -- Test cterm & Normal values. #18024 (tail) & #18980 -- Ensure Normal, and groups that match Normal return their fg & bg cterm values meths.set_hl(0, 'Normal', {ctermfg = 17, ctermbg = 213}) - meths.set_hl(0, 'NotNormal', {ctermfg = 17, ctermbg = 213}) + meths.set_hl(0, 'NotNormal', {ctermfg = 17, ctermbg = 213, nocombine = true}) -- Note colors are "cterm" values, not rgb-as-ints eq({foreground = 17, background = 213}, nvim("get_hl_by_name", 'Normal', false)) - eq({foreground = 17, background = 213}, nvim("get_hl_by_name", 'NotNormal', false)) + eq({foreground = 17, background = 213, nocombine = true}, nvim("get_hl_by_name", 'NotNormal', false)) end) it('nvim_get_hl_id_by_name', function() @@ -214,6 +215,7 @@ describe("API: set highlight", function() reverse = true, undercurl = true, strikethrough = true, + nocombine = true, } } local highlight3_result_gui = { @@ -236,6 +238,7 @@ describe("API: set highlight", function() reverse = true, undercurl = true, strikethrough = true, + nocombine = true, } local function get_ns() @@ -290,7 +293,7 @@ describe("API: set highlight", function() exec_capture('highlight Test_hl')) meths.set_hl(0, 'Test_hl2', highlight3_config) - eq('Test_hl2 xxx cterm=undercurl,italic,reverse,strikethrough ctermfg=8 ctermbg=15 gui=bold,underline,undercurl,underdouble,underdotted,underdashed,italic,reverse,strikethrough guifg=#ff0000 guibg=#0032aa', + eq('Test_hl2 xxx cterm=undercurl,italic,reverse,strikethrough,nocombine ctermfg=8 ctermbg=15 gui=bold,underline,undercurl,underdouble,underdotted,underdashed,italic,reverse,strikethrough guifg=#ff0000 guibg=#0032aa', exec_capture('highlight Test_hl2')) -- Colors are stored with the name they are defined, but |