[PATCH 10/13] git-svn: add UTF-8 message test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Eric Wong <normalperson@xxxxxxxx>
---
 contrib/git-svn/t/t0000-contrib-git-svn.sh |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/contrib/git-svn/t/t0000-contrib-git-svn.sh b/contrib/git-svn/t/t0000-contrib-git-svn.sh
index a07fbad..0c6ff20 100644
--- a/contrib/git-svn/t/t0000-contrib-git-svn.sh
+++ b/contrib/git-svn/t/t0000-contrib-git-svn.sh
@@ -4,6 +4,7 @@ # Copyright (c) 2006 Eric Wong
 #
 
 test_description='git-svn tests'
+GIT_SVN_LC_ALL=$LC_ALL
 . ./lib-git-svn.sh
 
 mkdir import
@@ -163,6 +164,18 @@ test_expect_success "$name" \
      diff -u help $SVN_TREE/exec-2.sh"
 
 
+if test -n "$GIT_SVN_LC_ALL" && echo $GIT_SVN_LC_ALL | grep -q '\.UTF-8$'
+then
+	name="commit with UTF-8 message: locale: $GIT_SVN_LC_ALL"
+	echo '# hello' >> exec-2.sh
+	git update-index exec-2.sh
+	git commit -m 'éïâ??'
+	export LC_ALL="$GIT_SVN_LC_ALL"
+	test_expect_success "$name" "git-svn commit HEAD"
+	unset LC_ALL
+else
+	echo "UTF-8 locale not set, test skipped ($GIT_SVN_LC_ALL)"
+fi
 
 name='test fetch functionality (svn => git) with alternate GIT_SVN_ID'
 GIT_SVN_ID=alt
-- 
1.4.0

-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]