aboutsummaryrefslogtreecommitdiff
path: root/test/client/session.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/client/session.lua')
-rw-r--r--test/client/session.lua12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/client/session.lua b/test/client/session.lua
index 5b7f1a7caa..a5839e012a 100644
--- a/test/client/session.lua
+++ b/test/client/session.lua
@@ -12,10 +12,8 @@ local RpcStream = require('test.client.rpc_stream')
--- @field private _rpc_stream test.RpcStream
--- @field private _prepare uv.uv_prepare_t
--- @field private _timer uv.uv_timer_t
---- @field exec_lua_setup boolean
--- @field private _is_running boolean true during `Session:run()` scope.
---- @field private _stdout_buffer string[] Stores stdout chunks
---- @field public stdout string Full stdout after the process exits
+--- @field exec_lua_setup boolean
local Session = {}
Session.__index = Session
if package.loaded['jit'] then
@@ -231,7 +229,13 @@ function Session:_run(request_cb, notification_cb, timeout)
end
self._rpc_stream:read_start(request_cb, notification_cb, function()
uv.stop()
- self.eof_err = { 1, 'EOF was received from Nvim. Likely the Nvim process crashed.' }
+
+ --- @diagnostic disable-next-line: invisible
+ local stderr = self._rpc_stream._stream.stderr --[[@as string?]]
+ -- See if `ProcStream.stderr` has anything useful.
+ stderr = '' ~= ((stderr or ''):match('^%s*(.*%S)') or '') and ' stderr:\n' .. stderr or ''
+
+ self.eof_err = { 1, 'EOF was received from Nvim. Likely the Nvim process crashed.' .. stderr }
end)
uv.run()
self._prepare:stop()