mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
test: Eliminate expect_err
Eliminate `expect_err` in favor of `pcall_err` + `eq` or `matches`.
This commit is contained in:
@@ -8,20 +8,21 @@ local funcs = helpers.funcs
|
||||
local meths = helpers.meths
|
||||
local insert = helpers.insert
|
||||
local expect = helpers.expect
|
||||
local expect_err = helpers.expect_err
|
||||
local command = helpers.command
|
||||
local exc_exec = helpers.exc_exec
|
||||
local write_file = helpers.write_file
|
||||
local curbufmeths = helpers.curbufmeths
|
||||
local missing_provider = helpers.missing_provider
|
||||
local matches = helpers.matches
|
||||
local pcall_err = helpers.pcall_err
|
||||
|
||||
do
|
||||
clear()
|
||||
if missing_provider('python') then
|
||||
it(':python reports E319 if provider is missing', function()
|
||||
local expected = [[Vim%(py.*%):E319: No "python" provider found.*]]
|
||||
expect_err(expected, command, 'py print("foo")')
|
||||
expect_err(expected, command, 'pyfile foo')
|
||||
matches(expected, pcall_err(command, 'py print("foo")'))
|
||||
matches(expected, pcall_err(command, 'pyfile foo'))
|
||||
end)
|
||||
pending('Python 2 (or the pynvim module) is broken/missing', function() end)
|
||||
return
|
||||
|
Reference in New Issue
Block a user