aboutsummaryrefslogtreecommitdiff
path: root/test/functional/provider/provider_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-09-06 17:17:37 -0700
committerJustin M. Keyes <justinkz@gmail.com>2019-09-06 17:19:07 -0700
commit7e1c9598617a140e40a0a22676c0631294617246 (patch)
treee6988da22f16062b57d50daeda084bcc489a6a1d /test/functional/provider/provider_spec.lua
parentaf946046b922dc5d5285a70a23d11916d8389a5d (diff)
downloadrneovim-7e1c9598617a140e40a0a22676c0631294617246.tar.gz
rneovim-7e1c9598617a140e40a0a22676c0631294617246.tar.bz2
rneovim-7e1c9598617a140e40a0a22676c0631294617246.zip
test: Eliminate expect_err
Eliminate `expect_err` in favor of `pcall_err` + `eq` or `matches`.
Diffstat (limited to 'test/functional/provider/provider_spec.lua')
-rw-r--r--test/functional/provider/provider_spec.lua11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/functional/provider/provider_spec.lua b/test/functional/provider/provider_spec.lua
index bfb0bbc3a3..78bc4a4edb 100644
--- a/test/functional/provider/provider_spec.lua
+++ b/test/functional/provider/provider_spec.lua
@@ -2,7 +2,8 @@
local helpers = require('test.functional.helpers')(after_each)
local clear, eval = helpers.clear, helpers.eval
local command = helpers.command
-local expect_err = helpers.expect_err
+local eq = helpers.eq
+local pcall_err = helpers.pcall_err
describe('providers', function()
before_each(function()
@@ -13,14 +14,14 @@ describe('providers', function()
command('set loadplugins')
-- Using test-fixture with broken impl:
-- test/functional/fixtures/autoload/provider/python.vim
- expect_err('Vim:provider: python: missing required variable g:loaded_python_provider',
- eval, "has('python')")
+ eq('Vim:provider: python: missing required variable g:loaded_python_provider',
+ pcall_err(eval, "has('python')"))
end)
it('with g:loaded_xx_provider, missing #Call()', function()
-- Using test-fixture with broken impl:
-- test/functional/fixtures/autoload/provider/ruby.vim
- expect_err('Vim:provider: ruby: g:loaded_ruby_provider=2 but provider#ruby#Call is not defined',
- eval, "has('ruby')")
+ eq('Vim:provider: ruby: g:loaded_ruby_provider=2 but provider#ruby#Call is not defined',
+ pcall_err(eval, "has('ruby')"))
end)
end)