File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -220,7 +220,7 @@ run_test_suite() {
220220 then
221221 run_tests || failure=$?
222222 else
223- failure=$?
223+ failure=1
224224 fi
225225 run_teardown_suite
226226
Original file line number Diff line number Diff line change @@ -165,6 +165,12 @@ test_bash_unit_runs_teardown_suite_even_in_case_of_failure_setup_suite() {
165165 " $( $BASH_UNIT <( echo ' setup_suite() { return 1 ; } ; teardown_suite() { echo "ran teardown_suite" >&2 ; }' ) 2>&1 > /dev/null) "
166166}
167167
168+ test_bash_unit_fails_in_case_of_failure_setup_suite () {
169+ # FIX https://github.com/bash-unit/bash_unit/issues/135
170+ assert_fail \
171+ " $BASH_UNIT <(echo 'setup_suite() { return 2 ; } ') 2>&1 >/dev/null"
172+ }
173+
168174test_one_test_should_stop_after_first_assertion_failure () {
169175 # FIX https://github.com/bash-unit/bash_unit/issues/10
170176 assert_equals " before failure" \
You can’t perform that action at this time.
0 commit comments