Skip to content

Commit

Permalink
annotated exit code modification
Browse files Browse the repository at this point in the history
  • Loading branch information
lehmannro committed Mar 25, 2014
1 parent 226d7f1 commit 403017e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion assert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,10 @@ _assert_fail() {
}

_assert_reset
tests_suite_status=0
: ${tests_suite_status:=0} # remember if any of the tests failed so far
_assert_cleanup() {
local status=$?
# modify exit code if it's not already non-zero
[[ $status -eq 0 && -z $CONTINUE ]] && exit $tests_suite_status
}
trap _assert_cleanup EXIT

0 comments on commit 403017e

Please sign in to comment.