diff mbox series

[1/2] t9822: skip tests if file names cannot be ISO-8895-1 encoded

Message ID 52681aee0a9657691521baf13f792bcfb9eeb898.1555069181.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series Prepare our git-p4 tests for running on APFS | expand

Commit Message

Kazuhiro Kato via GitGitGadget April 12, 2019, 11:39 a.m. UTC
From: Johannes Schindelin <johannes.schindelin@gmx.de>

Most notably, it seems that macOS' APFS does not allow that.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 t/t9822-git-p4-path-encoding.sh | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Luke Diamand April 13, 2019, 7:39 a.m. UTC | #1
On Fri, 12 Apr 2019 at 12:39, Johannes Schindelin via GitGitGadget
<gitgitgadget@gmail.com> wrote:
>
> From: Johannes Schindelin <johannes.schindelin@gmx.de>
>
> Most notably, it seems that macOS' APFS does not allow that.

Did you mean in the subject "ISO-8895-1" encoded or "ISO-8859-1" encoded?

It seems reasonable other than that!

>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
>  t/t9822-git-p4-path-encoding.sh | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/t/t9822-git-p4-path-encoding.sh b/t/t9822-git-p4-path-encoding.sh
> index c78477c19b..de0b46581d 100755
> --- a/t/t9822-git-p4-path-encoding.sh
> +++ b/t/t9822-git-p4-path-encoding.sh
> @@ -7,6 +7,13 @@ test_description='Clone repositories with non ASCII paths'
>  UTF8_ESCAPED="a-\303\244_o-\303\266_u-\303\274.txt"
>  ISO8859_ESCAPED="a-\344_o-\366_u-\374.txt"
>
> +ISO8859="$(printf "$ISO8859_ESCAPED")" &&
> +echo content123 >"$ISO8859" &&
> +rm "$ISO8859" || {
> +       skip_all="fs does not accept ISO-8859-1 filenames"
> +       test_done
> +}
> +
>  test_expect_success 'start p4d' '
>         start_p4d
>  '
> --
> gitgitgadget
>
Johannes Schindelin April 14, 2019, 7:38 p.m. UTC | #2
Hi Luke,

On Sat, 13 Apr 2019, Luke Diamand wrote:

> On Fri, 12 Apr 2019 at 12:39, Johannes Schindelin via GitGitGadget
> <gitgitgadget@gmail.com> wrote:
> >
> > From: Johannes Schindelin <johannes.schindelin@gmx.de>
> >
> > Most notably, it seems that macOS' APFS does not allow that.
>
> Did you mean in the subject "ISO-8895-1" encoded or "ISO-8859-1" encoded?

D'oh... Fixed in v2!

> It seems reasonable other than that!

Thanks,
Dscho
diff mbox series

Patch

diff --git a/t/t9822-git-p4-path-encoding.sh b/t/t9822-git-p4-path-encoding.sh
index c78477c19b..de0b46581d 100755
--- a/t/t9822-git-p4-path-encoding.sh
+++ b/t/t9822-git-p4-path-encoding.sh
@@ -7,6 +7,13 @@  test_description='Clone repositories with non ASCII paths'
 UTF8_ESCAPED="a-\303\244_o-\303\266_u-\303\274.txt"
 ISO8859_ESCAPED="a-\344_o-\366_u-\374.txt"
 
+ISO8859="$(printf "$ISO8859_ESCAPED")" &&
+echo content123 >"$ISO8859" &&
+rm "$ISO8859" || {
+	skip_all="fs does not accept ISO-8859-1 filenames"
+	test_done
+}
+
 test_expect_success 'start p4d' '
 	start_p4d
 '