Skip to content

Commit fd41084

Browse files
committed
tests: fail with non-zero child exitcode/signal
Ref: neovim/lua-client#44
1 parent ee1199e commit fd41084

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/functional/helpers.lua

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,16 @@ return function(after_each)
827827
error(msg[3][2])
828828
end
829829
end
830+
831+
if not session.child_exit then
832+
session:close()
833+
end
834+
if session.child_exit then -- requires newer neovim-lua-client (WIP).
835+
if session.child_exit ~= 0 or session.child_signal ~= 0 then
836+
busted.fail(string.format("child exited non-zero (exitcode=%d, signal=%d)",
837+
session.child_exit, session.child_signal))
838+
end
839+
end
830840
end
831841
end)
832842
end

0 commit comments

Comments
 (0)