summaryrefslogtreecommitdiff
path: root/t/test-lib.sh
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2012-07-26 13:39:56 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-07-27 17:11:14 (GMT)
commit5b0b5dd49b55e474a2df502902682853e2cd6e9d (patch)
tree72d0eeb3ea55b952bcc637a6871993115aa30209 /t/test-lib.sh
parent2b71b5221a66abd881919dd45609285e7af5c56f (diff)
downloadgit-5b0b5dd49b55e474a2df502902682853e2cd6e9d.zip
git-5b0b5dd49b55e474a2df502902682853e2cd6e9d.tar.gz
git-5b0b5dd49b55e474a2df502902682853e2cd6e9d.tar.bz2
test-lib: provide UTF8 behaviour as a prerequisite
UTF8 behaviour of the filesystem (conversion from nfd to nfc) plays a role in several tests and is tested in several tests. Therefore, move the test from t0050 into the test lib and use the prerequisite in t0050. Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 81cf4df..78c4286 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -670,6 +670,19 @@ test_lazy_prereq CASE_INSENSITIVE_FS '
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.
test -w / || test_set_prereq SANITY