Thread (113 messages) flat view 113 messages, 3 authors, 2016-06-15

Re: [PATCH 03/72] t/test-lib.sh: add always-set NO_GETTEXT_POISON prerequisite

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:50:37

On Sun, Feb 20, 2011 at 03:10, Jonathan Nieder [off-list ref] wrote:
Hi Ævar,

Ævar Arnfjörð Bjarmason wrote:
quoted
Add a new test prerequisite called NO_GETTEXT_POISON to t/test-lib.sh
that's always set for now.
Suppose I am writing a new family of tests.  Which of them will need
the NO_GETTEXT_POISON prerequisite?  The name doesn't make it easy to
guess.
You shouldn't worry about it for now. FWIW NO_GETTEXT_POISON is
documented in po/README in a patch that I plan to submit later.

NO_GETTEXT_POISON is only relevant to people such as myself who are
adding new translations to the source. I.e. changing "foo" to
_("foo"). It's a sanity check to make sure that by doing so you're not
changing some plumbing test, or at least have to realize what it is
that you're changing.

It's not perfect since we don't have tests for everything, but it's
helped me a few times.
If later the testsuite learns to take a --lang= option to test that
git works correctly in my native language.
Yeah, I plan to add something like --lang later, but for now we have
POISON :)
-# Always set the NO_GETTEXT_POISON prerequisite while we don't have a
-# real gettext implementation in Git. This will be replaced by
-# something that varies in a future patch series.
-test_set_prereq NO_GETTEXT_POISON
+# We can rely on output using the C locale.
+test_set_prereq ENGLISH
It's explicitly about tests that can't deal with poison, not
non-English. See this comment in patch  28/72:

    gettextize: 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help