aboutsummaryrefslogtreecommitdiff
path: root/test/functional/viml/function_spec.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2016-06-15 23:40:23 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2016-06-17 18:47:45 +0200
commit16424caedaad3bf14b09654c00358af07f462935 (patch)
treeac4b56e34fffe86530d110f834885bcf8bb81358 /test/functional/viml/function_spec.lua
parent51fe40a03389a9a6fa81d149f135527efcb3f722 (diff)
downloadrneovim-16424caedaad3bf14b09654c00358af07f462935.tar.gz
rneovim-16424caedaad3bf14b09654c00358af07f462935.tar.bz2
rneovim-16424caedaad3bf14b09654c00358af07f462935.zip
eval: add api_info()
Previously, the api metadata was only accessible frow within nvim as msgpackparse(systemlist('nvim --api-info'))[0]
Diffstat (limited to 'test/functional/viml/function_spec.lua')
-rw-r--r--test/functional/viml/function_spec.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/viml/function_spec.lua b/test/functional/viml/function_spec.lua
index 776e760aaf..f0a4406593 100644
--- a/test/functional/viml/function_spec.lua
+++ b/test/functional/viml/function_spec.lua
@@ -2,6 +2,7 @@ local helpers = require('test.functional.helpers')(after_each)
local clear = helpers.clear
local eq = helpers.eq
+local eval = helpers.eval
local exc_exec = helpers.exc_exec
describe('Up to MAX_FUNC_ARGS arguments are handled by', function()
@@ -27,3 +28,11 @@ describe('Up to MAX_FUNC_ARGS arguments are handled by', function()
eq('Vim(call):E740: Too many arguments for function rpcnotify', ret)
end)
end)
+
+describe('api_info()', function()
+ before_each(clear)
+ it('has the right keys', function()
+ local api_keys = eval("sort(keys(api_info()))")
+ eq({'error_types', 'functions', 'types'}, api_keys)
+ end)
+end)