test: correct detection of UTF8_NFD_TO_NFC for APFS
On HFS (which is the default Mac filesystem prior to High Sierra), unicode names are "decomposed" before recording. On APFS, which appears to be the new default filesystem in Mac OS High Sierra, filenames are recorded as specified by the user. APFS continues to allow the user to access it via any name that normalizes to the same thing. This difference causes t0050-filesystem.sh to fail two tests. Improve the test for a NFD/NFC in test-lib.sh: Test if the same file can be reached in pre- and decomposed unicode. Reported-By: Elijah Newren <newren@gmail.com> Signed-off-by: Torsten Bögershausen <tboegi@web.de> Tested-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Torsten Bögershausen committed
Apr 30, 2018 at 08:35 UTC
742ae10e355041bb19b8d3d530453136e2a8eff2
1 file changed
+1
-6
t/test-lib.sh
+1
-6
@@ -1092,12 +1092,7 @@ test_lazy_prereq UTF8_NFD_TO_NFC '
1092
auml=$(printf "\303\244")
1093
aumlcdiar=$(printf "\141\314\210")
1094
>"$auml" &&
1095
- case "$(echo *)" in
1096
- "$aumlcdiar")
1097
- true ;;
1098
- *)
1099
- false ;;
1100
- esac
1095
+ test -f "$aumlcdiar"
1096
'
1097
1098
test_lazy_prereq AUTOIDENT '