]> git.notmuchmail.org Git - notmuch/blobdiff - test/test-lib.sh
xregcomp: don't consider every regex compilation failure an internal error.
[notmuch] / test / test-lib.sh
index b1b0db89602838e78c0d9577cd205842c7835bfe..f524ebf6701f0e261c3afaf14b0752a1861b4b4b 100755 (executable)
@@ -462,6 +462,7 @@ test_expect_equal ()
     fi
 }
 
+# Like test_expect_equal, but takes two filenames.
 test_expect_equal_file ()
 {
        exec 1>&6 2>&7          # Restore stdout and stderr
@@ -563,6 +564,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 +586,7 @@ test_known_broken_failure_ () {
        test_subtest_known_broken_=
        test_broken=$(($test_broken+1))
        test_failure_message_ "BROKEN" "$@"
+       return 1
 }
 
 test_debug () {
@@ -722,7 +725,7 @@ test_external_without_stderr () {
        fi
 }
 
-# This is not among top-level (test_expect_success | test_expect_failure)
+# This is not among top-level (test_expect_success)
 # but is a prefix that can be used in the test script, like:
 #
 #      test_expect_success 'complain and die' '