From: Junio C Hamano <gitster@pobox.com>
To: tboegi@web.de
Cc: git@vger.kernel.org, newren@gmail.com
Subject: Re: [PATCH v1 1/1] test: Correct detection of UTF8_NFD_TO_NFC for APFS
Date: Mon, 30 Apr 2018 16:56:02 +0900 [thread overview]
Message-ID: <xmqqvac9xh4d.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20180430063519.27122-1-tboegi@web.de> (tboegi@web.de's message of "Mon, 30 Apr 2018 08:35:19 +0200")
tboegi@web.de writes:
> From: Torsten Bögershausen <tboegi@web.de>
>
> 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>
> ---
> t/test-lib.sh | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
Thanks.
Wouldn't it logically make more sense to check for the target being
an existing file with "-f"? It is not an essential part of the test
for the target to be "readable", but "can be stat(2)ed with the
other UTF-8 representation" is.
> 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 '
> auml=$(printf "\303\244")
> aumlcdiar=$(printf "\141\314\210")
> >"$auml" &&
> - case "$(echo *)" in
> - "$aumlcdiar")
> - true ;;
> - *)
> - false ;;
> - esac
> + test -r "$aumlcdiar"
> '
>
> test_lazy_prereq AUTOIDENT '
next prev parent reply other threads:[~2018-04-30 7:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-26 16:48 BUG report: unicode normalization on APFS (Mac OS High Sierra) Elijah Newren
2018-04-26 17:13 ` Torsten Bögershausen
2018-04-26 17:23 ` Elijah Newren
2018-04-27 21:45 ` Totsten Bögershausen
2018-04-30 15:29 ` Elijah Newren
2018-04-30 6:35 ` [PATCH v1 1/1] test: Correct detection of UTF8_NFD_TO_NFC for APFS tboegi
2018-04-30 7:56 ` Junio C Hamano [this message]
2018-04-30 8:55 ` Torsten Bögershausen
2018-04-30 15:33 ` Elijah Newren
2018-04-30 15:41 ` Torsten Bögershausen
2018-04-30 15:47 ` Elijah Newren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqvac9xh4d.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=newren@gmail.com \
--cc=tboegi@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox