mirror of
https://github.com/neovim/neovim.git
synced 2025-09-08 04:18:18 +00:00
tests: unit.helpers: provide string with write errors (#10715)
This might help to have more information in case of errors, like mentioned in https://github.com/neovim/neovim/commit/eec529cf9e.
This commit is contained in:
@@ -456,8 +456,8 @@ else
|
|||||||
if bytes_written == -1 then
|
if bytes_written == -1 then
|
||||||
local err = ffi.errno(0)
|
local err = ffi.errno(0)
|
||||||
if err ~= ffi.C.kPOSIXErrnoEINTR then
|
if err ~= ffi.C.kPOSIXErrnoEINTR then
|
||||||
assert(false, ("write() error: %u: %s"):format(
|
assert(false, ("write() error: %u: %s ('%s')"):format(
|
||||||
err, ffi.string(ffi.C.strerror(err))))
|
err, ffi.string(ffi.C.strerror(err)), s))
|
||||||
end
|
end
|
||||||
elseif bytes_written == 0 then
|
elseif bytes_written == 0 then
|
||||||
break
|
break
|
||||||
|
Reference in New Issue
Block a user