Merge branch 'po/describe-not-necessarily-7'
[gitweb.git] / t / t0000-basic.sh
index 26601e698bd3abebd2e1f10ba6012f80c65ffa85..c03054c538a0f9220cb268ed4fa24ae963d06e84 100755 (executable)
@@ -87,6 +87,10 @@ _run_sub_test_lib_test_common () {
                passing metrics
                '
 
+               # Tell the framework that we are self-testing to make sure
+               # it yields a stable result.
+               GIT_TEST_FRAMEWORK_SELFTEST=t &&
+
                # Point to the t/test-lib.sh, which isn't in ../ as usual
                . "\$TEST_DIRECTORY"/test-lib.sh
                EOF
@@ -270,7 +274,7 @@ test_expect_success 'pretend we have a mix of all possible results' "
        EOF
 "
 
-test_expect_success 'test --verbose' '
+test_expect_success C_LOCALE_OUTPUT 'test --verbose' '
        test_must_fail run_sub_test_lib_test \
                test-verbose "test verbose" --verbose <<-\EOF &&
        test_expect_success "passing test" true
@@ -821,6 +825,24 @@ test_expect_success 'tests clean up even on failures' "
        EOF
 "
 
+test_expect_success 'test_atexit is run' "
+       test_must_fail run_sub_test_lib_test \
+               atexit-cleanup 'Run atexit commands' -i <<-\\EOF &&
+       test_expect_success 'tests clean up even after a failure' '
+               > ../../clean-atexit &&
+               test_atexit rm ../../clean-atexit &&
+               > ../../also-clean-atexit &&
+               test_atexit rm ../../also-clean-atexit &&
+               > ../../dont-clean-atexit &&
+               (exit 1)
+       '
+       test_done
+       EOF
+       test_path_is_file dont-clean-atexit &&
+       test_path_is_missing clean-atexit &&
+       test_path_is_missing also-clean-atexit
+"
+
 test_expect_success 'test_oid setup' '
        test_oid_init
 '