aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-08-06 17:42:32 +0200
committerGitHub <noreply@github.com>2019-08-06 17:42:32 +0200
commite85b4e749e21a79a700edd7f0744eeaaaea804d5 (patch)
tree360110f7f975f9c94ef403b0e330950129771fac
parent067a39ba854cc02a750911ead968a744b2769aac (diff)
downloadrneovim-e85b4e749e21a79a700edd7f0744eeaaaea804d5.tar.gz
rneovim-e85b4e749e21a79a700edd7f0744eeaaaea804d5.tar.bz2
rneovim-e85b4e749e21a79a700edd7f0744eeaaaea804d5.zip
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.
-rw-r--r--test/unit/helpers.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/unit/helpers.lua b/test/unit/helpers.lua
index b5d3dd9f47..24dbc65bd0 100644
--- a/test/unit/helpers.lua
+++ b/test/unit/helpers.lua
@@ -456,8 +456,8 @@ else
if bytes_written == -1 then
local err = ffi.errno(0)
if err ~= ffi.C.kPOSIXErrnoEINTR then
- assert(false, ("write() error: %u: %s"):format(
- err, ffi.string(ffi.C.strerror(err))))
+ assert(false, ("write() error: %u: %s ('%s')"):format(
+ err, ffi.string(ffi.C.strerror(err)), s))
end
elseif bytes_written == 0 then
break