]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t0000-basic.sh
Merge branch 'en/merge-recursive-directory-rename-fixes'
[thirdparty/git.git] / t / t0000-basic.sh
index 4c01f60dd3ca0f2cab26298dbc795e08a61b819b..4d3f7ba295967e752dcf38f1fb050152ca679eef 100755 (executable)
@@ -391,6 +391,44 @@ test_expect_success 'GIT_SKIP_TESTS sh pattern' "
        )
 "
 
+test_expect_success 'GIT_SKIP_TESTS entire suite' "
+       (
+               GIT_SKIP_TESTS='git' && export GIT_SKIP_TESTS &&
+               run_sub_test_lib_test git-skip-tests-entire-suite \
+                       'GIT_SKIP_TESTS entire suite' <<-\\EOF &&
+               for i in 1 2 3
+               do
+                       test_expect_success \"passing test #\$i\" 'true'
+               done
+               test_done
+               EOF
+               check_sub_test_lib_test git-skip-tests-entire-suite <<-\\EOF
+               > 1..0 # SKIP skip all tests in git
+               EOF
+       )
+"
+
+test_expect_success 'GIT_SKIP_TESTS does not skip unmatched suite' "
+       (
+               GIT_SKIP_TESTS='notgit' && export GIT_SKIP_TESTS &&
+               run_sub_test_lib_test git-skip-tests-unmatched-suite \
+                       'GIT_SKIP_TESTS does not skip unmatched suite' <<-\\EOF &&
+               for i in 1 2 3
+               do
+                       test_expect_success \"passing test #\$i\" 'true'
+               done
+               test_done
+               EOF
+               check_sub_test_lib_test git-skip-tests-unmatched-suite <<-\\EOF
+               > ok 1 - passing test #1
+               > ok 2 - passing test #2
+               > ok 3 - passing test #3
+               > # passed all 3 test(s)
+               > 1..3
+               EOF
+       )
+"
+
 test_expect_success '--run basic' "
        run_sub_test_lib_test run-basic \
                '--run basic' --run='1 3 5' <<-\\EOF &&