channel: recognized nvim-style errors

This commit is contained in:
Scott Prager
2015-04-06 13:37:09 -04:00
parent 676133aa9b
commit 920e5905d8
2 changed files with 25 additions and 1 deletions

View File

@@ -148,5 +148,11 @@ describe('server -> client', function()
-- Call get_line_slice(buf, range [0,0], includes start, includes end)
eq({'SOME TEXT'}, eval("rpcrequest(vim, 'buffer_get_line_slice', "..buf..", 0, 0, 1, 1)"))
end)
it('returns an error if the request failed', function()
local status, err = pcall(eval, "rpcrequest(vim, 'does-not-exist')")
eq(false, status)
eq(true, string.match(err, ': (.*)') == 'Failed to evaluate expression')
end)
end)
end)