[RFC 3/8] Extend tests to cover locale wrt to commit messages.

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

 



---
 t/t1100-commit-tree-options.sh |   12 ++++++------
 t/t1400-update-ref.sh          |   10 +++++-----
 t/t3400-rebase.sh              |    6 +++---
 t/t3401-rebase-partial.sh      |    8 ++++----
 t/t3402-rebase-merge.sh        |   17 ++++++++++-------
 t/t3403-rebase-skip.sh         |   10 +++++-----
 6 files changed, 33 insertions(+), 30 deletions(-)

diff --git a/t/t1100-commit-tree-options.sh b/t/t1100-commit-tree-options.sh
index 19a0ed4..04f2e3b 100755
--- a/t/t1100-commit-tree-options.sh
+++ b/t/t1100-commit-tree-options.sh
@@ -13,10 +13,10 @@ object by defining all environment variables that it understands.
 
 cat >expected <<EOF
 tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
-author Author Name <author@email> 1117148400 +0000
-committer Committer Name <committer@email> 1117150200 +0000
+author Authör Name <author@email> 1117148400 +0000
+committer Committer Näme <committer@email> 1117150200 +0000
 
-comment text
+cömment text
 EOF
 
 test_expect_success \
@@ -25,11 +25,11 @@ test_expect_success \
 
 test_expect_success \
     'construct commit' \
-    'echo comment text |
-     GIT_AUTHOR_NAME="Author Name" \
+    'echo cömment text |
+     GIT_AUTHOR_NAME="Authör Name" \
      GIT_AUTHOR_EMAIL="author@email" \
      GIT_AUTHOR_DATE="2005-05-26 23:00" \
-     GIT_COMMITTER_NAME="Committer Name" \
+     GIT_COMMITTER_NAME="Committer Näme" \
      GIT_COMMITTER_EMAIL="committer@email" \
      GIT_COMMITTER_DATE="2005-05-26 23:30" \
      TZ=GMT git-commit-tree `cat treeid` >commitid 2>/dev/null'
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index b3b920e..0daff8a 100755
--- a/t/t1400-update-ref.sh
+++ b/t/t1400-update-ref.sh
@@ -71,12 +71,12 @@ touch .git/logs/refs/heads/master
 test_expect_success \
 	"create $m (logged by touch)" \
 	'GIT_COMMITTER_DATE="2005-05-26 23:30" \
-	 git-update-ref HEAD '"$A"' -m "Initial Creation" &&
+	 git-update-ref HEAD '"$A"' -m "Initial Creation. /mäster" &&
 	 test '"$A"' = $(cat .git/'"$m"')'
 test_expect_success \
 	"update $m (logged by touch)" \
 	'GIT_COMMITTER_DATE="2005-05-26 23:31" \
-	 git-update-ref HEAD'" $B $A "'-m "Switch" &&
+	 git-update-ref HEAD'" $B $A "'-m "Switch /mäster" &&
 	 test '"$B"' = $(cat .git/'"$m"')'
 test_expect_success \
 	"set $m (logged by touch)" \
@@ -84,9 +84,9 @@ test_expect_success \
 	 git-update-ref HEAD'" $A &&
 	 test $A"' = $(cat .git/'"$m"')'
 
-cat >expect <<EOF
-$Z $A $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000	Initial Creation
-$A $B $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150260 +0000	Switch
+iconv -f iso-8859-1 -t utf-8 >expect <<EOF
+$Z $A $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000	Initial Creation. /mäster
+$A $B $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150260 +0000	Switch /mäster
 $B $A $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150860 +0000
 EOF
 test_expect_success \
diff --git a/t/t3400-rebase.sh b/t/t3400-rebase.sh
index b9d3131..2982615 100755
--- a/t/t3400-rebase.sh
+++ b/t/t3400-rebase.sh
@@ -15,15 +15,15 @@ test_expect_success \
     'prepare repository with topic branch, then rebase against master' \
     'echo First > A &&
      git-update-index --add A &&
-     git-commit -m "Add A." &&
+     git-commit -m "Add Ä." &&
      git checkout -b my-topic-branch &&
      echo Second > B &&
      git-update-index --add B &&
-     git-commit -m "Add B." &&
+     git-commit -m "Add ß." &&
      git checkout -f master &&
      echo Third >> A &&
      git-update-index A &&
-     git-commit -m "Modify A." &&
+     git-commit -m "Modify ¢." &&
      git checkout -f my-topic-branch &&
      git rebase master'
 
diff --git a/t/t3401-rebase-partial.sh b/t/t3401-rebase-partial.sh
index 8b19d3c..801b631 100755
--- a/t/t3401-rebase-partial.sh
+++ b/t/t3401-rebase-partial.sh
@@ -15,23 +15,23 @@ test_expect_success \
     'prepare repository with topic branch' \
     'echo First > A &&
      git-update-index --add A &&
-     git-commit -m "Add A." &&
+     git-commit -m "Add Ä." &&
 
      git-checkout -b my-topic-branch &&
 
      echo Second > B &&
      git-update-index --add B &&
-     git-commit -m "Add B." &&
+     git-commit -m "Add ß." &&
 
      echo AnotherSecond > C &&
      git-update-index --add C &&
-     git-commit -m "Add C." &&
+     git-commit -m "Add ¢." &&
 
      git-checkout -f master &&
 
      echo Third >> A &&
      git-update-index A &&
-     git-commit -m "Modify A."
+     git-commit -m "Modify Ä."
 '
 
 test_expect_success \
diff --git a/t/t3402-rebase-merge.sh b/t/t3402-rebase-merge.sh
index 0779aaa..8045995 100755
--- a/t/t3402-rebase-merge.sh
+++ b/t/t3402-rebase-merge.sh
@@ -7,8 +7,11 @@ test_description='git rebase --merge test'
 
 . ./test-lib.sh
 
-T="A quick brown fox
-jumps over the lazy dog."
+export GIT_AUTHOR_NAME="Pär Nördsson"
+
+T="A quick brown föx
+jumps over the läzy dog."
+
 for i in 1 2 3 4 5 6 7 8 9 10
 do
 	echo "$i $T"
@@ -19,24 +22,24 @@ test_expect_success setup '
 	git commit -m"initial" &&
 	git branch side &&
 	echo "11 $T" >>original &&
-	git commit -a -m"master updates a bit." &&
+	git commit -a -m"mäster updates a bit." &&
 
 	echo "12 $T" >>original &&
-	git commit -a -m"master updates a bit more." &&
+	git commit -a -m"mäster updates a bit more." &&
 
 	git checkout side &&
 	(echo "0 $T" ; cat original) >renamed &&
 	git add renamed &&
 	git update-index --force-remove original &&
-	git commit -a -m"side renames and edits." &&
+	git commit -a -m"side renames and ädits." &&
 
 	tr "[a-z]" "[A-Z]" <original >newfile &&
 	git add newfile &&
-	git commit -a -m"side edits further." &&
+	git commit -a -m"side edits fürther." &&
 
 	tr "[a-m]" "[A-M]" <original >newfile &&
 	rm -f original &&
-	git commit -a -m"side edits once again." &&
+	git commit -a -m"side edits önce again." &&
 
 	git branch test-rebase side &&
 	git branch test-rebase-pick side &&
diff --git a/t/t3403-rebase-skip.sh b/t/t3403-rebase-skip.sh
index 977c498..84f14fd 100755
--- a/t/t3403-rebase-skip.sh
+++ b/t/t3403-rebase-skip.sh
@@ -13,20 +13,20 @@ test_description='git rebase --merge --skip tests'
 test_expect_success setup '
 	echo hello > hello &&
 	git add hello &&
-	git commit -m "hello" &&
+	git commit -m "hällo" &&
 	git branch skip-reference &&
 
 	echo world >> hello &&
-	git commit -a -m "hello world" &&
+	git commit -a -m "hällo world" &&
 	echo goodbye >> hello &&
-	git commit -a -m "goodbye" &&
+	git commit -a -m "göödbye" &&
 
 	git checkout -f skip-reference &&
 	echo moo > hello &&
-	git commit -a -m "we should skip this" &&
+	git commit -a -m "we shöld skip this" &&
 	echo moo > cow &&
 	git add cow &&
-	git commit -m "this should not be skipped" &&
+	git commit -m "this shöd not be skipped" &&
 	git branch pre-rebase skip-reference &&
 	git branch skip-merge skip-reference
 	'
-- 
1.6.3.dirty

--
To unsubscribe from this list: 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]