2019-06-09 10:22:10 -07:00
|
|
|
|
|
|
|
local helpers = require('test.functional.helpers')(after_each)
|
2019-08-04 03:37:05 -07:00
|
|
|
local clear, eval = helpers.clear, helpers.eval
|
2019-08-03 18:54:06 -07:00
|
|
|
local command = helpers.command
|
2019-09-06 17:17:37 -07:00
|
|
|
local eq = helpers.eq
|
|
|
|
local pcall_err = helpers.pcall_err
|
2019-06-09 10:22:10 -07:00
|
|
|
|
2019-08-03 18:54:06 -07:00
|
|
|
describe('providers', function()
|
2019-06-09 10:22:10 -07:00
|
|
|
before_each(function()
|
|
|
|
clear('--cmd', 'let &rtp = "test/functional/fixtures,".&rtp')
|
|
|
|
end)
|
|
|
|
|
2019-08-04 03:37:05 -07:00
|
|
|
it('with #Call(), missing g:loaded_xx_provider', function()
|
2019-08-03 18:54:06 -07:00
|
|
|
command('set loadplugins')
|
2019-08-04 03:20:30 -07:00
|
|
|
-- Using test-fixture with broken impl:
|
|
|
|
-- test/functional/fixtures/autoload/provider/python.vim
|
2019-09-06 17:17:37 -07:00
|
|
|
eq('Vim:provider: python: missing required variable g:loaded_python_provider',
|
|
|
|
pcall_err(eval, "has('python')"))
|
2019-06-09 10:22:10 -07:00
|
|
|
end)
|
|
|
|
|
2019-08-04 03:37:05 -07:00
|
|
|
it('with g:loaded_xx_provider, missing #Call()', function()
|
2019-08-04 03:20:30 -07:00
|
|
|
-- Using test-fixture with broken impl:
|
|
|
|
-- test/functional/fixtures/autoload/provider/ruby.vim
|
2019-09-06 17:17:37 -07:00
|
|
|
eq('Vim:provider: ruby: g:loaded_ruby_provider=2 but provider#ruby#Call is not defined',
|
|
|
|
pcall_err(eval, "has('ruby')"))
|
2019-06-09 10:22:10 -07:00
|
|
|
end)
|
|
|
|
end)
|