test: include stderr in EOF failure message

This commit is contained in:
Justin M. Keyes
2025-01-03 18:39:42 +01:00
parent a1ba655dee
commit 700a25e621
3 changed files with 20 additions and 14 deletions

View File

@@ -333,9 +333,9 @@ end
function M.expect_exit(fn_or_timeout, ...)
local eof_err_msg = 'EOF was received from Nvim. Likely the Nvim process crashed.'
if type(fn_or_timeout) == 'function' then
eq(eof_err_msg, t.pcall_err(fn_or_timeout, ...))
t.matches(eof_err_msg, t.pcall_err(fn_or_timeout, ...))
else
eq(
t.matches(
eof_err_msg,
t.pcall_err(function(timeout, fn, ...)
fn(...)