aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/highlight_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/ui/highlight_spec.lua')
-rw-r--r--test/functional/ui/highlight_spec.lua28
1 files changed, 18 insertions, 10 deletions
diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua
index 47b923c8e2..c989418409 100644
--- a/test/functional/ui/highlight_spec.lua
+++ b/test/functional/ui/highlight_spec.lua
@@ -2426,16 +2426,24 @@ describe('highlight namespaces', function()
end)
it('winhl does not accept invalid value #24586', function()
- local res = exec_lua([[
- local curwin = vim.api.nvim_get_current_win()
- vim.api.nvim_command("set winhl=Normal:Visual")
- local _, msg = pcall(vim.api.nvim_command,"set winhl='Normal:Wrong'")
- return { msg, vim.wo[curwin].winhl }
- ]])
- eq({
- 'Vim(set):E5248: Invalid character in group name',
- 'Normal:Visual',
- }, res)
+ command('set winhl=Normal:Visual')
+ for _, cmd in ipairs({
+ [[set winhl='Normal:Wrong']],
+ [[set winhl=Normal:Wrong']],
+ [[set winhl='Normal:Wrong]],
+ }) do
+ local res = exec_lua(
+ [[
+ local _, msg = pcall(vim.api.nvim_command, ...)
+ return { msg, vim.wo.winhl }
+ ]],
+ cmd
+ )
+ eq({
+ 'Vim(set):E5248: Invalid character in group name',
+ 'Normal:Visual',
+ }, res)
+ end
end)
it('Normal in set_hl #25474', function()