git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Robin Rosenberg <robin.rosenberg@dewire.com>
Date
May 12, 2009, 22:50 UTC
Message-ID
<1242168631-30753-4-git-send-email-robin.rosenberg@dewire.com>
In-Reply-To
<1242168631-30753-3-git-send-email-robin.rosenberg@dewire.com>
---
 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
Previous: Robin RosenbergNext: Robin Rosenberg
Message 4 of 20 in “[RFC 0/8] Antique UTF-8 filename support”
  1. Robin RosenbergMay 12, 2009
  2. 1/8 UTF helpersRobin Rosenberg, May 12, 2009
  3. 2/8 Messages in locale.Robin Rosenberg, May 12, 2009
  4. 3/8 Extend tests to cover locale wrt to commit messages.Robin Rosenberg, May 12, 2009
  5. 4/8 UTF file names.Robin Rosenberg, May 12, 2009
  6. Johannes SchindelinMay 13, 2009
  7. Robin RosenbergMay 13, 2009
  8. Esko LuontolaMay 13, 2009
  9. Andreas EricssonMay 13, 2009
  10. Esko LuontolaMay 13, 2009
  11. Alex RiesenMay 13, 2009
  12. Junio C HamanoMay 13, 2009
  13. Esko LuontolaMay 13, 2009
  14. Junio C HamanoMay 13, 2009
  15. Johannes SchindelinMay 13, 2009
  16. Junio C HamanoMay 14, 2009
  17. Jay SoffianMay 14, 2009
  18. 6/8 test of utf_locallinksRobin Rosenberg, May 12, 2009
  19. 7/8 Convert symlink dest in diffRobin Rosenberg, May 12, 2009
  20. 8/8 UTF-8 in non-SHA1-objectsRobin Rosenberg, May 12, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.