diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2011-02-22 23:41:48 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-03-09 23:52:54 -0800 |
commit | 0b430a17ae88e56703270af7e29f845ffc7a891c (patch) | |
tree | e7085187725499f3a3ba81f3f99d677256c809d8 /t/t7502-commit.sh | |
parent | 7f5673d7030a4792319917ece0484d8379aa811f (diff) | |
download | git-0b430a17ae88e56703270af7e29f845ffc7a891c.tar.gz git-0b430a17ae88e56703270af7e29f845ffc7a891c.tar.xz |
i18n: git-commit "enter the commit message" message
Gettextize the "# Please enter the commit message for your changes."
message. Several tests in t7500-commit.sh and t7502-commit.sh assume
that this message starts with a newline. Change the tests to to skip
under GETTEXT_POISON=YesPlease.
These fail under GETTEXT_POISON=YesPlease because the poison editor
message doesn't do the right thing with comments and line breaks, so
these messages will be incorrectly broken up across lines.
This test should not be skipped under a hypothetical future testing
mode that tests Git under language locales, since those messages
should all start with a newline like the original.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7502-commit.sh')
-rwxr-xr-x | t/t7502-commit.sh | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh index dad1b2b80..1f29b5cd9 100755 --- a/t/t7502-commit.sh +++ b/t/t7502-commit.sh @@ -221,19 +221,21 @@ test_expect_success 'cleanup commit messages (strip,-F)' ' ' -echo "sample - -# Please enter the commit message for your changes. Lines starting -# with '#' will be ignored, and an empty message aborts the commit." >expect - test_expect_success 'cleanup commit messages (strip,-F,-e)' ' echo >>negative && { echo;echo sample;echo; } >text && git commit -e -F text -a && - head -n 4 .git/COMMIT_EDITMSG >actual && - test_cmp expect actual + head -n 4 .git/COMMIT_EDITMSG >actual +' + +echo "sample +# Please enter the commit message for your changes. Lines starting +# with '#' will be ignored, and an empty message aborts the commit." >expect + +test_expect_success C_LOCALE_OUTPUT 'cleanup commit messages (strip,-F,-e): output' ' + test_cmp expect actual ' echo "# @@ -244,7 +246,10 @@ test_expect_success C_LOCALE_OUTPUT 'author different from committer' ' echo >>negative && git commit -e -m "sample" - head -n 7 .git/COMMIT_EDITMSG >actual && + head -n 7 .git/COMMIT_EDITMSG >actual +' + +test_expect_success C_LOCALE_OUTPUT 'author different from committer: output' ' test_cmp expect actual ' @@ -264,7 +269,10 @@ test_expect_success C_LOCALE_OUTPUT 'committer is automatic' ' test_must_fail git commit -e -m "sample" ) && head -n 8 .git/COMMIT_EDITMSG | \ - sed "s/^# Committer: .*/# Committer:/" >actual && + sed "s/^# Committer: .*/# Committer:/" >actual +' + +test_expect_success C_LOCALE_OUTPUT 'committer is automatic: output' ' test_cmp expect actual ' |