aboutsummaryrefslogtreecommitdiff
path: root/test/functional/provider/provider_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-08-04 15:52:56 +0200
committerGitHub <noreply@github.com>2019-08-04 15:52:56 +0200
commit96be8a2c4d63faadb97c346abb336511a60ac89a (patch)
tree71167260e69f87566391af2b1a8924987e6fe1d7 /test/functional/provider/provider_spec.lua
parent2860453c4f9ad6abd7a967f9278401ae84a927e2 (diff)
parent2141dc22625f73f3ce73460e581934b94f141cf9 (diff)
downloadrneovim-96be8a2c4d63faadb97c346abb336511a60ac89a.tar.gz
rneovim-96be8a2c4d63faadb97c346abb336511a60ac89a.tar.bz2
rneovim-96be8a2c4d63faadb97c346abb336511a60ac89a.zip
Merge #10161 from equalsraf/tb-clipboard-reload
Support "reload" of providers
Diffstat (limited to 'test/functional/provider/provider_spec.lua')
-rw-r--r--test/functional/provider/provider_spec.lua26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/functional/provider/provider_spec.lua b/test/functional/provider/provider_spec.lua
new file mode 100644
index 0000000000..bfb0bbc3a3
--- /dev/null
+++ b/test/functional/provider/provider_spec.lua
@@ -0,0 +1,26 @@
+
+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
+
+describe('providers', function()
+ before_each(function()
+ clear('--cmd', 'let &rtp = "test/functional/fixtures,".&rtp')
+ end)
+
+ it('with #Call(), missing g:loaded_xx_provider', 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')")
+ 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')")
+ end)
+end)