aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/bufhl_spec.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2017-10-19 11:46:07 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2017-10-19 11:59:32 +0200
commitdfe806ea8b90ace9ef2ee63aafbf10ebea2df7ef (patch)
tree5e95126753bf9cea01966a1e362f032964fc1b52 /test/functional/ui/bufhl_spec.lua
parent91586d1ad4acd799e2815d774d5af2935bad8a0e (diff)
downloadrneovim-dfe806ea8b90ace9ef2ee63aafbf10ebea2df7ef.tar.gz
rneovim-dfe806ea8b90ace9ef2ee63aafbf10ebea2df7ef.tar.bz2
rneovim-dfe806ea8b90ace9ef2ee63aafbf10ebea2df7ef.zip
bufhl: support creating new groups
Diffstat (limited to 'test/functional/ui/bufhl_spec.lua')
-rw-r--r--test/functional/ui/bufhl_spec.lua31
1 files changed, 30 insertions, 1 deletions
diff --git a/test/functional/ui/bufhl_spec.lua b/test/functional/ui/bufhl_spec.lua
index e1e11203e0..2143c01139 100644
--- a/test/functional/ui/bufhl_spec.lua
+++ b/test/functional/ui/bufhl_spec.lua
@@ -24,7 +24,8 @@ describe('Buffer highlighting', function()
[6] = {foreground = Screen.colors.DarkCyan}, -- Identifier
[7] = {bold = true},
[8] = {underline = true, bold = true, foreground = Screen.colors.SlateBlue},
- [9] = {foreground = Screen.colors.SlateBlue, underline = true}
+ [9] = {foreground = Screen.colors.SlateBlue, underline = true},
+ [10] = {foreground = Screen.colors.Red}
})
curbuf = request('nvim_get_current_buf')
end)
@@ -255,4 +256,32 @@ describe('Buffer highlighting', function()
|
]])
end)
+
+ it('works with new syntax groups', function()
+ insert([[
+ fancy code in a new fancy language]])
+ add_hl(-1, "FancyLangItem", 0, 0, 5)
+ screen:expect([[
+ fancy code in a new fancy languag^e |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ |
+ ]])
+
+ command('hi FancyLangItem guifg=red')
+ screen:expect([[
+ {10:fancy} code in a new fancy languag^e |
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ {1:~ }|
+ |
+ ]])
+ end)
end)