Thread (9 messages) 9 messages, 2 authors, 2018-04-30

Re: [PATCH v1 1/1] test: Correct detection of UTF8_NFD_TO_NFC for APFS

From: Elijah Newren <hidden>
Date: 2018-04-30 15:33:09

Hi,

On Sun, Apr 29, 2018 at 11:35 PM,  [off-list ref] wrote:
quoted hunk ↗ jump to hunk
From: Torsten Bögershausen <redacted>

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 <redacted>
Signed-off-by: Torsten Bögershausen <redacted>
---
 t/test-lib.sh | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/t/test-lib.sh b/t/test-lib.sh
index ea2bbaaa7a..e206250d1b 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -1106,12 +1106,7 @@ test_lazy_prereq UTF8_NFD_TO_NFC '
I'm not sure what "NFD" and "NFC" stand for, but I suspect the test
prerequisite name may be specific to how HFS handled things.  If so,
should it be renamed from UTF8_NFD_TO_NFC to something else, such as
UTF8_NORMALIZATION?
        auml=$(printf "\303\244")
        aumlcdiar=$(printf "\141\314\210")
        >"$auml" &&
-       case "$(echo *)" in
-       "$aumlcdiar")
-               true ;;
-       *)
-               false ;;
-       esac
+       test -r "$aumlcdiar"
 '

 test_lazy_prereq AUTOIDENT '
--
2.16.0.rc0.8.g5497051b43
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help