diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-10-01 10:39:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-01 10:39:31 +0200 |
commit | 9b3045103f7d56e5ccd0574dcb93e953b72d5f50 (patch) | |
tree | 303dfcb93ac93664838e7c0d362a88aaf8b6b34f /test/functional/api/highlight_spec.lua | |
parent | 2da66f1f710523548ca0746d5f7ef945de6d8f6a (diff) | |
parent | 2615ed879e66a3d05920c47177e77383adc7aca0 (diff) | |
download | rneovim-9b3045103f7d56e5ccd0574dcb93e953b72d5f50.tar.gz rneovim-9b3045103f7d56e5ccd0574dcb93e953b72d5f50.tar.bz2 rneovim-9b3045103f7d56e5ccd0574dcb93e953b72d5f50.zip |
Merge pull request #25455 from bfredl/highlight_namespace_getters
feat(ui): allow to get the highlight namespace. closes #24390
Diffstat (limited to 'test/functional/api/highlight_spec.lua')
-rw-r--r-- | test/functional/api/highlight_spec.lua | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/functional/api/highlight_spec.lua b/test/functional/api/highlight_spec.lua index 1a054741ef..7d7d07e30e 100644 --- a/test/functional/api/highlight_spec.lua +++ b/test/functional/api/highlight_spec.lua @@ -637,3 +637,19 @@ describe('API: get highlight', function() eq({link ='Foo', default = true}, meths.get_hl(0, {name = 'Bar'})) end) end) + +describe('API: set/get highlight namespace', function() + it('set/get highlight namespace', function() + eq(0, meths.get_hl_ns({})) + local ns = meths.create_namespace('') + meths.set_hl_ns(ns) + eq(ns, meths.get_hl_ns({})) + end) + + it('set/get window highlight namespace', function() + eq(-1, meths.get_hl_ns({winid = 0})) + local ns = meths.create_namespace('') + meths.win_set_hl_ns(0, ns) + eq(ns, meths.get_hl_ns({winid = 0})) + end) +end) |