diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-03-01 02:30:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-01 02:30:05 +0100 |
commit | e7bd49d835e26c96b2ee152e5b697e20ab749650 (patch) | |
tree | b02e91d42c8b8a8ef578076ae8bf8deef26b94b5 /test/unit/helpers.lua | |
parent | 533d4a36ec03626e9d796ef7e2a9aa3c0e1ce7bf (diff) | |
parent | 403922b1b47c1f03272e2bdd600dcc02db481389 (diff) | |
download | rneovim-e7bd49d835e26c96b2ee152e5b697e20ab749650.tar.gz rneovim-e7bd49d835e26c96b2ee152e5b697e20ab749650.tar.bz2 rneovim-e7bd49d835e26c96b2ee152e5b697e20ab749650.zip |
Merge #7920 'env: use libuv v1.12 getenv/setenv API'
Diffstat (limited to 'test/unit/helpers.lua')
-rw-r--r-- | test/unit/helpers.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/unit/helpers.lua b/test/unit/helpers.lua index f8143a0125..beb25f25db 100644 --- a/test/unit/helpers.lua +++ b/test/unit/helpers.lua @@ -645,16 +645,16 @@ local function itp_child(wr, func) s = s:sub(1, hook_msglen - 2) sc.write(wr, '>' .. s .. (' '):rep(hook_msglen - 2 - #s) .. '\n') end - local err, emsg = pcall(init) - if err then + local status, result = pcall(init) + if status then collectgarbage('stop') child_sethook(wr) - err, emsg = pcall(func) + status, result = pcall(func) debug.sethook() end - emsg = tostring(emsg) sc.write(wr, trace_end_msg) - if not err then + if not status then + local emsg = tostring(result) if #emsg > 99999 then emsg = emsg:sub(1, 99999) end @@ -668,7 +668,7 @@ local function itp_child(wr, func) collectgarbage() sc.write(wr, '$\n') sc.close(wr) - sc.exit(err and 0 or 1) + sc.exit(status and 0 or 1) end local function check_child_err(rd) |