diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-08-22 11:51:26 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-08-22 11:51:27 -0700 |
commit | 16a3f91a3682ae4b8221329d12b51488c5d8846a (patch) | |
tree | 1a82bb695750d23133d91efa5aeadea1e20e6f11 /t/test-lib.sh | |
parent | Merge branch 'ms/git-svn-1.7' (diff) | |
parent | t3910: use the UTF8_NFD_TO_NFC test prereq (diff) | |
download | tgif-16a3f91a3682ae4b8221329d12b51488c5d8846a.tar.xz |
Merge branch 'jc/test-prereq'
Teaches the test framework to probe rarely used prerequistes lazily,
and make use of it for detecting SYMLINKS, CASE_INSENSITIVE_FS and
NKD/NKC MacOS x gotcha.
* jc/test-prereq:
t3910: use the UTF8_NFD_TO_NFC test prereq
test-lib: provide UTF8 behaviour as a prerequisite
t0050: use the SYMLINKS test prereq
t0050: use the CASE_INSENSITIVE_FS test prereq
test-lib: provide case insensitivity as a prerequisite
test: allow prerequisite to be evaluated lazily
test: rename $satisfied to $satisfied_prereq
Diffstat (limited to 't/test-lib.sh')
-rw-r--r-- | t/test-lib.sh | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index bb4f8865b2..78c428619e 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -659,9 +659,29 @@ test_i18ngrep () { fi } -# test whether the filesystem supports symbolic links -ln -s x y 2>/dev/null && test -h y 2>/dev/null && test_set_prereq SYMLINKS -rm -f y +test_lazy_prereq SYMLINKS ' + # test whether the filesystem supports symbolic links + ln -s x y && test -h y +' + +test_lazy_prereq CASE_INSENSITIVE_FS ' + echo good >CamelCase && + echo bad >camelcase && + test "$(cat CamelCase)" != good +' + +test_lazy_prereq UTF8_NFD_TO_NFC ' + # check whether FS converts nfd unicode to nfc + auml=$(printf "\303\244") + aumlcdiar=$(printf "\141\314\210") + >"$auml" && + case "$(echo *)" in + "$aumlcdiar") + true ;; + *) + false ;; + esac +' # When the tests are run as root, permission tests will report that # things are writable when they shouldn't be. |