mirror of
https://github.com/neovim/neovim.git
synced 2026-11-02 20:30:40 -06:00
refactor(test): drop deprecated exc_exec #39242
This commit is contained in:
1 parent
faa7c15b5a
commit
4ceca862fc
77 files changed
+1009
-799
No files matched your search
@@ -1,13 +1,15 @@
|
||||
local t = require('test.testutil')
|
||||
local pcall_err = t.pcall_err
|
||||
local n = require('test.functional.testnvim')()
|
||||
local Screen = require('test.functional.ui.screen')
|
||||
|
||||
local eq, command = t.eq, n.command
|
||||
local clear = n.clear
|
||||
local eval, exc_exec = n.eval, n.exc_exec
|
||||
local eval = n.eval
|
||||
local exec = n.exec
|
||||
local fn = n.fn
|
||||
local api = n.api
|
||||
local command = n.command
|
||||
|
||||
describe(':highlight', function()
|
||||
before_each(function()
|
||||
@@ -18,16 +20,16 @@ describe(':highlight', function()
|
||||
it('invalid color name', function()
|
||||
eq(
|
||||
'Vim(highlight):E421: Color name or number not recognized: ctermfg=#181818',
|
||||
exc_exec('highlight normal ctermfg=#181818')
|
||||
pcall_err(command, 'highlight normal ctermfg=#181818')
|
||||
)
|
||||
eq(
|
||||
'Vim(highlight):E421: Color name or number not recognized: ctermbg=#181818',
|
||||
exc_exec('highlight normal ctermbg=#181818')
|
||||
pcall_err(command, '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', pcall_err(command, 'highlight foo'))
|
||||
end)
|
||||
|
||||
it('"Normal" foreground with red', function()
|
||||
|
||||
Reference in new issue
Block a user