provider_spec.lua 972 B

12345678910111213141516171819202122232425262728
  1. local helpers = require('test.functional.helpers')(after_each)
  2. local clear, eval = helpers.clear, helpers.eval
  3. local command = helpers.command
  4. local eq = helpers.eq
  5. local pcall_err = helpers.pcall_err
  6. describe('providers', function()
  7. before_each(function()
  8. clear('--cmd', 'let &rtp = "test/functional/fixtures,".&rtp')
  9. end)
  10. it('with #Call(), missing g:loaded_xx_provider', function()
  11. command('set loadplugins')
  12. -- Using test-fixture with broken impl:
  13. -- test/functional/fixtures/autoload/provider/python.vim
  14. eq('Vim:provider: python: missing required variable g:loaded_python_provider',
  15. pcall_err(eval, "has('python')"))
  16. end)
  17. it('with g:loaded_xx_provider, missing #Call()', function()
  18. -- Using test-fixture with broken impl:
  19. -- test/functional/fixtures/autoload/provider/ruby.vim
  20. eq('Vim:provider: ruby: g:loaded_ruby_provider=2 but provider#ruby#Call is not defined',
  21. pcall_err(eval, "has('ruby')"))
  22. end)
  23. end)