aboutsummaryrefslogtreecommitdiff
path: root/test/functional/provider/provider_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/provider/provider_spec.lua')
-rw-r--r--test/functional/provider/provider_spec.lua19
1 files changed, 19 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..6f414f36f4
--- /dev/null
+++ b/test/functional/provider/provider_spec.lua
@@ -0,0 +1,19 @@
+
+local helpers = require('test.functional.helpers')(after_each)
+local clear, eq, feed_command, eval = helpers.clear, helpers.eq, helpers.feed_command, helpers.eval
+
+describe('Providers', function()
+ before_each(function()
+ clear('--cmd', 'let &rtp = "test/functional/fixtures,".&rtp')
+ end)
+
+ it('must set the enabled variable or fail', function()
+ eq(42, eval("provider#brokenenabled#Call('dosomething', [])"))
+ feed_command("call has('brokenenabled')")
+ eq(0, eval("has('brokenenabled')"))
+ end)
+
+ it('without Call() are enabled', function()
+ eq(1, eval("has('brokencall')"))
+ end)
+end)