mirror of
https://github.com/neovim/neovim.git
synced 2025-10-17 23:31:51 +00:00
eval: add api_info()
Previously, the api metadata was only accessible frow within nvim as msgpackparse(systemlist('nvim --api-info'))[0]
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user