diff options
author | Michael J Gruber <git@drmicha.warpmail.net> | 2012-07-26 15:39:53 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-07-27 10:08:33 -0700 |
commit | ac39aa612147b595e02876a4c9d6ca7e8063ba3d (patch) | |
tree | c295a0e3302ce693a28c7cda3a7bf77a485d9f56 | |
parent | test: allow prerequisite to be evaluated lazily (diff) | |
download | tgif-ac39aa612147b595e02876a4c9d6ca7e8063ba3d.tar.xz |
test-lib: provide case insensitivity as a prerequisite
Case insensitivity plays a role in several tests and is tested in several
tests. Therefore, move the test from t003 into the test lib and use the
prerequisite in t0003.
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | t/README | 4 | ||||
-rwxr-xr-x | t/t0003-attributes.sh | 10 | ||||
-rw-r--r-- | t/test-lib.sh | 6 |
3 files changed, 10 insertions, 10 deletions
@@ -625,6 +625,10 @@ use these, and "test_set_prereq" for how to define your own. Git was compiled with USE_LIBPCRE=YesPlease. Wrap any tests that use git-grep --perl-regexp or git-grep -P in these. + - CASE_INSENSITIVE_FS + + Test is run on a case insensitive file system. + Tips for Writing Tests ---------------------- diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh index 51f3045ba4..febc45c9cc 100755 --- a/t/t0003-attributes.sh +++ b/t/t0003-attributes.sh @@ -123,16 +123,6 @@ test_expect_success 'attribute matching is case insensitive when core.ignorecase ' -test_expect_success 'check whether FS is case-insensitive' ' - mkdir junk && - echo good >junk/CamelCase && - echo bad >junk/camelcase && - if test "$(cat junk/CamelCase)" != good - then - test_set_prereq CASE_INSENSITIVE_FS - fi -' - test_expect_success CASE_INSENSITIVE_FS 'additional case insensitivity tests' ' test_must_fail attr_check a/B/D/g "a/b/d/*" "-c core.ignorecase=0" && test_must_fail attr_check A/B/D/NO "a/b/d/*" "-c core.ignorecase=0" && diff --git a/t/test-lib.sh b/t/test-lib.sh index 35739b9fbe..81cf4dfb04 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -664,6 +664,12 @@ test_lazy_prereq SYMLINKS ' ln -s x y && test -h y ' +test_lazy_prereq CASE_INSENSITIVE_FS ' + echo good >CamelCase && + echo bad >camelcase && + test "$(cat CamelCase)" != good +' + # When the tests are run as root, permission tests will report that # things are writable when they shouldn't be. test -w / || test_set_prereq SANITY |