]> git.notmuchmail.org Git - notmuch/blobdiff - test/test-lib.sh
test: Report test failures from test_expect_*
[notmuch] / test / test-lib.sh
index 966b2dcfd64ab9975171c39c1959fb10ae5941a2..f8df6a5f1b8f921cabfd39d26a1763d388f30564 100755 (executable)
@@ -449,7 +449,7 @@ test_expect_equal ()
 
        output="$1"
        expected="$2"
-       if ! test_skip "$@"
+       if ! test_skip "$test_subtest_name"
        then
                if [ "$output" = "$expected" ]; then
                        test_ok_ "$test_subtest_name"
@@ -472,7 +472,7 @@ test_expect_equal_file ()
 
        output="$1"
        expected="$2"
-       if ! test_skip "$@"
+       if ! test_skip "$test_subtest_name"
        then
                if diff -q "$expected" "$output" >/dev/null ; then
                        test_ok_ "$test_subtest_name"
@@ -563,6 +563,7 @@ test_failure_ () {
        test_failure=$(($test_failure + 1))
        test_failure_message_ "FAIL" "$@"
        test "$immediate" = "" || { GIT_EXIT_OK=t; exit 1; }
+       return 1
 }
 
 test_failure_message_ () {
@@ -584,6 +585,7 @@ test_known_broken_failure_ () {
        test_subtest_known_broken_=
        test_broken=$(($test_broken+1))
        test_failure_message_ "BROKEN" "$@"
+       return 1
 }
 
 test_debug () {