diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-03-09 15:00:41 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-03-09 15:00:41 -0700 |
commit | 7a7f497b483cd65e340064f23ed1c73425ecba0a (patch) | |
tree | d5c99ea22a1e10300d06165f8ac96df6b0dc59e1 /test/functional/ex_cmds/highlight_spec.lua | |
parent | 1b7b916b7631ddf73c38e3a0070d64e4636cb2f3 (diff) | |
parent | ade1b12f49c3b3914c74847d791eb90ea90b56b7 (diff) | |
download | rneovim-7a7f497b483cd65e340064f23ed1c73425ecba0a.tar.gz rneovim-7a7f497b483cd65e340064f23ed1c73425ecba0a.tar.bz2 rneovim-7a7f497b483cd65e340064f23ed1c73425ecba0a.zip |
Merge remote-tracking branch 'upstream/master' into aucmd_textputpost
Diffstat (limited to 'test/functional/ex_cmds/highlight_spec.lua')
-rw-r--r-- | test/functional/ex_cmds/highlight_spec.lua | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/test/functional/ex_cmds/highlight_spec.lua b/test/functional/ex_cmds/highlight_spec.lua index 958dd99226..897a2997bc 100644 --- a/test/functional/ex_cmds/highlight_spec.lua +++ b/test/functional/ex_cmds/highlight_spec.lua @@ -1,11 +1,11 @@ local Screen = require('test.functional.ui.screen') -local helpers = require("test.functional.helpers")(after_each) +local helpers = require('test.functional.helpers')(after_each) local eq, command = helpers.eq, helpers.command local clear = helpers.clear local eval, exc_exec = helpers.eval, helpers.exc_exec local exec = helpers.exec -local funcs = helpers.funcs -local meths = helpers.meths +local fn = helpers.fn +local api = helpers.api describe(':highlight', function() local screen @@ -17,15 +17,18 @@ describe(':highlight', function() end) it('invalid color name', function() - eq('Vim(highlight):E421: Color name or number not recognized: ctermfg=#181818', - exc_exec("highlight normal ctermfg=#181818")) - eq('Vim(highlight):E421: Color name or number not recognized: ctermbg=#181818', - exc_exec("highlight normal ctermbg=#181818")) + eq( + 'Vim(highlight):E421: Color name or number not recognized: ctermfg=#181818', + exc_exec('highlight normal ctermfg=#181818') + ) + eq( + 'Vim(highlight):E421: Color name or number not recognized: ctermbg=#181818', + exc_exec('highlight normal ctermbg=#181818') + ) end) it('invalid group name', function() - eq('Vim(highlight):E411: Highlight group not found: foo', - exc_exec("highlight foo")) + eq('Vim(highlight):E411: Highlight group not found: foo', exc_exec('highlight foo')) end) it('"Normal" foreground with red', function() @@ -50,18 +53,18 @@ describe(':highlight', function() end) it('clear', function() - meths.set_var('colors_name', 'foo') - eq(1, funcs.exists('g:colors_name')) + api.nvim_set_var('colors_name', 'foo') + eq(1, fn.exists('g:colors_name')) command('hi clear') - eq(0, funcs.exists('g:colors_name')) - meths.set_var('colors_name', 'foo') - eq(1, funcs.exists('g:colors_name')) + eq(0, fn.exists('g:colors_name')) + api.nvim_set_var('colors_name', 'foo') + eq(1, fn.exists('g:colors_name')) exec([[ func HiClear() hi clear endfunc ]]) - funcs.HiClear() - eq(0, funcs.exists('g:colors_name')) + fn.HiClear() + eq(0, fn.exists('g:colors_name')) end) end) |