Skip to content

Commit

Permalink
tests: fail with non-zero child exitcode/signal
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed committed Nov 29, 2019
1 parent ee1199e commit fd41084
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/functional/helpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -827,6 +827,16 @@ return function(after_each)
error(msg[3][2])
end
end

if not session.child_exit then
session:close()
end
if session.child_exit then -- requires newer neovim-lua-client (WIP).
if session.child_exit ~= 0 or session.child_signal ~= 0 then
busted.fail(string.format("child exited non-zero (exitcode=%d, signal=%d)",
session.child_exit, session.child_signal))
end
end
end
end)
end
Expand Down

0 comments on commit fd41084

Please sign in to comment.