All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: git@vger.kernel.org, tboegi@web.de
Cc: iveqy@iveqy.com
Subject: [PATCH] t7400: test of UTF-8 submodule names pass under Mac OS
Date: Thu, 20 Jun 2013 16:58:48 +0200	[thread overview]
Message-ID: <201306201658.50174.tboegi@web.de> (raw)

submodules with names using UTF-8 need core.precomposeunicode true
under Mac OS X, set it in the TC.

Improve the portability:
Not all shells on all OS may understand literal UTF-8 strings.
Use a help variable filled by printf, as we do it in e.g. t0050.

"strange names" can be called UTF-8, rephrase the heading

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
---
I wasn't fast enough to catch it on pu:
fg/submodule-non-ascii-path

 t/t7400-submodule-basic.sh | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh
index 0376370..fedfa5b 100755
--- a/t/t7400-submodule-basic.sh
+++ b/t/t7400-submodule-basic.sh
@@ -889,16 +889,19 @@ test_expect_success 'submodule deinit fails when submodule has a .git directory
 	test -n "$(git config --get-regexp "submodule\.example\.")"
 '
 
-test_expect_success 'submodule with strange name works "å äö"' '
-	mkdir "å äö" &&
+svname=$(printf '\303\245 \303\244\303\266')
+test_expect_success 'submodule with UTF-8 name' '
+	mkdir "$svname" &&
 	(
-		cd "å äö" &&
+		cd "$svname" &&
 		git init &&
 		touch sub
 		git add sub
 		git commit -m "init sub"
 	)
-	git submodule add "/å äö" &&
-	test -n "$(git submodule | grep "å äö")"
+	git config core.precomposeunicode true &&
+	git submodule add /"$svname" &&
+	git submodule >&2 &&
+	test -n "$(git submodule | grep "$svname")"
 '
 test_done
-- 
1.8.3

             reply	other threads:[~2013-06-20 14:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20 14:58 Torsten Bögershausen [this message]
2013-06-20 19:01 ` [PATCH] t7400: test of UTF-8 submodule names pass under Mac OS Junio C Hamano

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=201306201658.50174.tboegi@web.de \
    --to=tboegi@web.de \
    --cc=git@vger.kernel.org \
    --cc=iveqy@iveqy.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.