aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/cmdline_highlight_spec.lua
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-10-29 16:32:13 +0300
committerZyX <kp-pav@yandex.ru>2017-10-29 16:32:13 +0300
commitb935a12dab17c3887db9c5fd7c90b34b2c51170f (patch)
treec5032a73820811fe7450bade7b054d4c9c077446 /test/functional/ui/cmdline_highlight_spec.lua
parent06bdc9ed839eedbead34d58214927d3c0cebff58 (diff)
downloadrneovim-b935a12dab17c3887db9c5fd7c90b34b2c51170f.tar.gz
rneovim-b935a12dab17c3887db9c5fd7c90b34b2c51170f.tar.bz2
rneovim-b935a12dab17c3887db9c5fd7c90b34b2c51170f.zip
ex_getln: Make use of new parser to color expressions
Retires g:Nvim_color_expr callback.
Diffstat (limited to 'test/functional/ui/cmdline_highlight_spec.lua')
-rw-r--r--test/functional/ui/cmdline_highlight_spec.lua26
1 files changed, 17 insertions, 9 deletions
diff --git a/test/functional/ui/cmdline_highlight_spec.lua b/test/functional/ui/cmdline_highlight_spec.lua
index d87ce72599..60a4a815e7 100644
--- a/test/functional/ui/cmdline_highlight_spec.lua
+++ b/test/functional/ui/cmdline_highlight_spec.lua
@@ -144,7 +144,9 @@ before_each(function()
EOB={bold = true, foreground = Screen.colors.Blue1},
ERR={foreground = Screen.colors.Grey100, background = Screen.colors.Red},
SK={foreground = Screen.colors.Blue},
- PE={bold = true, foreground = Screen.colors.SeaGreen4}
+ PE={bold = true, foreground = Screen.colors.SeaGreen4},
+ NUM={foreground = Screen.colors.Blue2},
+ NPAR={foreground = Screen.colors.Yellow},
})
end)
@@ -863,7 +865,10 @@ describe('Ex commands coloring support', function()
end)
describe('Expressions coloring support', function()
it('works', function()
- meths.set_var('Nvim_color_expr', 'RainBowParens')
+ meths.command('hi clear NVimNumber')
+ meths.command('hi clear NVimNestingParenthesis')
+ meths.command('hi NVimNumber guifg=Blue2')
+ meths.command('hi NVimNestingParenthesis guifg=Yellow')
feed(':echo <C-r>=(((1)))')
screen:expect([[
|
@@ -873,21 +878,24 @@ describe('Expressions coloring support', function()
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
- ={RBP1:(}{RBP2:(}{RBP3:(}1{RBP3:)}{RBP2:)}{RBP1:)}^ |
+ ={NPAR:(((}{NUM:1}{NPAR:)))}^ |
]])
end)
- it('errors out when failing to get callback', function()
+ it('does not use Nvim_color_expr', function()
meths.set_var('Nvim_color_expr', 42)
+ -- Used to error out due to failing to get callback.
+ meths.command('hi clear NVimNumber')
+ meths.command('hi NVimNumber guifg=Blue2')
feed(':<C-r>=1')
screen:expect([[
+ |
+ {EOB:~ }|
+ {EOB:~ }|
+ {EOB:~ }|
{EOB:~ }|
{EOB:~ }|
{EOB:~ }|
- = |
- {ERR:E5409: Unable to get g:Nvim_color_expr c}|
- {ERR:allback: Vim:E6000: Argument is not a fu}|
- {ERR:nction or function name} |
- =1^ |
+ ={NUM:1}^ |
]])
end)
end)