diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-08-31 19:47:10 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-31 19:47:10 +0800 |
commit | fa747d004a1e91b30066020f2f592e4dc5d94084 (patch) | |
tree | cde286673b3b87cb0154813e08736f2e0c2888d0 /test/functional/api/highlight_spec.lua | |
parent | 0903702634d8e5714749ea599a2f1042b3377525 (diff) | |
download | rneovim-fa747d004a1e91b30066020f2f592e4dc5d94084.tar.gz rneovim-fa747d004a1e91b30066020f2f592e4dc5d94084.tar.bz2 rneovim-fa747d004a1e91b30066020f2f592e4dc5d94084.zip |
fix(api): nvim_set_hl bail out on invalid group name (#20021)
Diffstat (limited to 'test/functional/api/highlight_spec.lua')
-rw-r--r-- | test/functional/api/highlight_spec.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/functional/api/highlight_spec.lua b/test/functional/api/highlight_spec.lua index 2730f7e23d..3b36563d21 100644 --- a/test/functional/api/highlight_spec.lua +++ b/test/functional/api/highlight_spec.lua @@ -354,4 +354,9 @@ describe("API: set highlight", function() meths.set_hl(0, 'Normal', {fg='#000083', bg='#0000F3'}) eq({foreground = 131, background = 243}, nvim("get_hl_by_name", 'Normal', true)) end) + + it('does not segfault on invalid group name #20009', function() + eq('Invalid highlight name: foo bar', pcall_err(meths.set_hl, 0, 'foo bar', {bold = true})) + assert_alive() + end) end) |