From 8b42249cddf6b257e2eee808a41f3d6dd5af6846 Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Sat, 1 Dec 2018 16:44:36 +0100 Subject: 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(). --- test/functional/helpers.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/functional/helpers.lua') 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 -- cgit