Test is run on a case insensitive file system.
+ - UTF8_NFD_TO_NFC
+
+ Test is run on a filesystem which converts decomposed utf-8 (nfd)
+ to precomposed utf-8 (nfc).
+
Tips for Writing Tests
----------------------
auml=$(printf '\303\244')
aumlcdiar=$(printf '\141\314\210')
-unibad=
-test_expect_success 'see what we expect' '
-
- test_unicode=test_expect_success &&
- mkdir junk &&
- >junk/"$auml" &&
- case "$(cd junk && echo *)" in
- "$aumlcdiar")
- test_unicode=test_expect_failure &&
- unibad=t
- ;;
- *) ;;
- esac &&
- rm -fr junk
-'
-
if test_have_prereq CASE_INSENSITIVE_FS
then
say "will test on a case insensitive filesystem"
test_case=test_expect_success
fi
-test "$unibad" &&
+if test_have_prereq UTF8_NFD_TO_NFC
+then
say "will test on a unicode corrupting filesystem"
+ test_unicode=test_expect_failure
+else
+ test_unicode=test_expect_success
+fi
+
test_have_prereq SYMLINKS ||
say "will test on a filesystem lacking symbolic links"
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