{"thread":{"id":"26614","subject":"[PATCH] gitweb: Make i18n (encoding) tests in t9500 leave clean state","startedAt":"2011-02-27T16:58:32Z","lastAt":"2011-02-27T16:58:32Z","messageCount":1,"participants":["Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"162374","messageId":"20110227165624.13543.89662.stgit@localhost.localdomain","threadId":"26614","inReplyTo":null,"subject":"[PATCH] gitweb: Make i18n (encoding) tests in t9500 leave clean state","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2011-02-27T16:58:32Z","receivedAt":"2011-02-27T16:58:32Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"The most important issue is that after unsetting `i18n.commitencoding'\nconfig variable t9500 no longer will use author and comitter name\ncontaining ISO-8859-1 characters, which are invalid UTF-8 characters.\n\nBesides it is good practice in general to clean up the state in tests.\n\nSigned-off-by: Jakub Narebski <jnareb@gmail.com>\n---\n t/t9500-gitweb-standalone-no-errors.sh |    6 +++++-\n 1 files changed, 5 insertions(+), 1 deletions(-)\n\ndiff --git a/t/t9500-gitweb-standalone-no-errors.sh b/t/t9500-gitweb-standalone-no-errors.sh\nindex 0dc573d..9e24bdd 100755\n--- a/t/t9500-gitweb-standalone-no-errors.sh\n+++ b/t/t9500-gitweb-standalone-no-errors.sh\n@@ -446,6 +446,8 @@ test_expect_success \\\n test_expect_success \\\n \t'encode(commit): utf8' \\\n \t'. \"$TEST_DIRECTORY\"/t3901-utf8.txt &&\n+\t test_when_finished \"GIT_AUTHOR_NAME=\\\"A U Thor\\\"\" &&\n+\t test_when_finished \"GIT_COMMITTER_NAME=\\\"C O Mitter\\\"\" &&\n \t echo \"UTF-8\" >> file &&\n \t git add file &&\n \t git commit -F \"$TEST_DIRECTORY\"/t3900/1-UTF-8.txt &&\n@@ -454,11 +456,13 @@ test_expect_success \\\n test_expect_success \\\n \t'encode(commit): iso-8859-1' \\\n \t'. \"$TEST_DIRECTORY\"/t3901-8859-1.txt &&\n+\t test_when_finished \"GIT_AUTHOR_NAME=\\\"A U Thor\\\"\" &&\n+\t test_when_finished \"GIT_COMMITTER_NAME=\\\"C O Mitter\\\"\" &&\n \t echo \"ISO-8859-1\" >> file &&\n \t git add file &&\n \t git config i18n.commitencoding ISO-8859-1 &&\n+\t test_when_finished \"git config --unset i18n.commitencoding\" &&\n \t git commit -F \"$TEST_DIRECTORY\"/t3900/ISO8859-1.txt &&\n-\t git config --unset i18n.commitencoding &&\n \t gitweb_run \"p=.git;a=commit\"'\n \n test_expect_success \\\n"}]}