aboutsummaryrefslogtreecommitdiff
path: root/test/functional/helpers.lua
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2018-12-01 16:44:36 +0100
committerBjörn Linse <bjorn.linse@gmail.com>2018-12-03 10:42:00 +0100
commit8b42249cddf6b257e2eee808a41f3d6dd5af6846 (patch)
tree72de67ecda2504f44f5183daaddb60809e855415 /test/functional/helpers.lua
parent07ad5d71ab97a84dc9c59b3507bf7898040d24cf (diff)
downloadrneovim-8b42249cddf6b257e2eee808a41f3d6dd5af6846.tar.gz
rneovim-8b42249cddf6b257e2eee808a41f3d6dd5af6846.tar.bz2
rneovim-8b42249cddf6b257e2eee808a41f3d6dd5af6846.zip
RPC: turn errors from async calls into notifications
Previously, nvim sent a response with invalid request id (UINT64_MAX). In functionaltests, catch unexpected error notifications in after_each().
Diffstat (limited to 'test/functional/helpers.lua')
-rw-r--r--test/functional/helpers.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index db90cb559f..a94e977cd0 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -757,6 +757,14 @@ return function(after_each)
end
check_logs()
check_cores('build/bin/nvim')
+ if session then
+ local msg = session:next_message(0)
+ if msg then
+ if msg[1] == "notification" and msg[2] == "nvim_error_event" then
+ error(msg[3][2])
+ end
+ end
+ end
end)
end
return module