1
0
mirror of https://github.com/sstephenson/bats.git synced 2026-02-25 17:28:11 +01:00

Test for failing tests

This commit is contained in:
Sam Stephenson
2011-12-28 19:14:10 -06:00
parent a469e8dd04
commit ac64e0b18a
3 changed files with 13 additions and 1 deletions

View File

@@ -66,10 +66,12 @@ bats_exit_trap() {
bats_perform_tests() {
echo "1..$#"
test_number=1
status=0
for test_name in "$@"; do
"$0" "$BATS_TEST_FILENAME" "$test_name" "$test_number" || true
"$0" "$BATS_TEST_FILENAME" "$test_name" "$test_number" || status=1
test_number=$(($test_number + 1))
done
exit "$status"
}
bats_perform_test() {