Implement API function to call functions #2979

Remove static modifier from func_call
Move MAX_FUNC_ARGS definnition from eval.c to eval.h
This commit is contained in:
Sebastian Witte
2015-07-08 07:40:28 +02:00
committed by Björn Linse
parent fb0ebb2a3a
commit fcb79ffc40
4 changed files with 63 additions and 2 deletions

View File

@@ -34,6 +34,15 @@ describe('vim_* functions', function()
end)
end)
describe('call_function', function()
it('works', function()
nvim('call_function', 'setqflist', {{{ filename = 'something', lnum = 17}}, 'r'})
eq(17, nvim('call_function', 'getqflist', {})[1].lnum)
eq(17, nvim('call_function', 'eval', {17}))
eq('foo', nvim('call_function', 'simplify', {'this/./is//redundant/../../../foo'}))
end)
end)
describe('strwidth', function()
it('works', function()
eq(3, nvim('strwidth', 'abc'))