API: return non-generic VimL errors

- Return VimL errors instead of generic errors for:
  - nvim_call_function
  - nvim_call_dict_function
- Fix tests which were silently broken before this change.

This violates #6150 where we agreed not to translate API errors.  But
that can be fixed later.
This commit is contained in:
Justin M. Keyes
2018-05-07 03:24:01 +02:00
parent 33bfea31b0
commit c9f3174075
10 changed files with 105 additions and 51 deletions

View File

@@ -51,12 +51,12 @@ describe('luaeval()', function()
end)
describe('recursive lua values', function()
it('are successfully transformed', function()
funcs.luaeval('rawset(_G, "d", {})')
funcs.luaeval('rawset(d, "d", d)')
command('lua rawset(_G, "d", {})')
command('lua rawset(d, "d", d)')
eq('\n{\'d\': {...@0}}', funcs.execute('echo luaeval("d")'))
funcs.luaeval('rawset(_G, "l", {})')
funcs.luaeval('table.insert(l, l)')
command('lua rawset(_G, "l", {})')
command('lua table.insert(l, l)')
eq('\n[[...@0]]', funcs.execute('echo luaeval("l")'))
end)
end)