git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] t9129: Prevent test failure if no UTF-8 locale
@ 2008-12-06  1:31 applehq
  2008-12-06  2:05 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: applehq @ 2008-12-06  1:31 UTC (permalink / raw)
  To: git

Commit 16fc08e2d86dad152194829d21bc55b2ef0c8fb1 introduced a
test that failed if the en_US.UTF-8 locale was not installed.

Make the test find a UTF-8 locale, and expect failure.

Signed-off-by: applehq <theappleman@gmail.com>
---
 t/t9129-git-svn-i18n-commitencoding.sh |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/t/t9129-git-svn-i18n-commitencoding.sh b/t/t9129-git-svn-i18n-commitencoding.sh
index 938b7fe..87ecdd0 100755
--- a/t/t9129-git-svn-i18n-commitencoding.sh
+++ b/t/t9129-git-svn-i18n-commitencoding.sh
@@ -15,8 +15,9 @@ compare_git_head_with () {
 }
 
 compare_svn_head_with () {
-	LC_ALL=en_US.UTF-8 svn log --limit 1 `git svn info --url` | \
-		sed -e 1,3d -e "/^-\{1,\}\$/d" >current &&
+	LC_ALL=`locale -a | grep -i utf | head -1` \
+		svn log --limit 1 `git svn info --url` | \
+			sed -e 1,3d -e "/^-\{1,\}\$/d" >current &&
 	test_cmp current "$1"
 }
 
@@ -60,7 +61,7 @@ do
 	'
 done
 
-test_expect_success 'ISO-8859-1 should match UTF-8 in svn' '
+test_expect_failure 'ISO-8859-1 should match UTF-8 in svn' '
 (
 	cd ISO-8859-1 &&
 	compare_svn_head_with "$TEST_DIRECTORY"/t3900/1-UTF-8.txt
@@ -69,7 +70,7 @@ test_expect_success 'ISO-8859-1 should match UTF-8 in svn' '
 
 for H in EUCJP ISO-2022-JP
 do
-	test_expect_success '$H should match UTF-8 in svn' '
+	test_expect_failure '$H should match UTF-8 in svn' '
 	(
 		cd $H &&
 		compare_svn_head_with "$TEST_DIRECTORY"/t3900/2-UTF-8.txt
-- 
1.6.1.rc1.53.g455b

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-06  2:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-06  1:31 [PATCH] t9129: Prevent test failure if no UTF-8 locale applehq
2008-12-06  2:05 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).