On Wed, May 30, 2012 at 1:49 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote: > Jonathan Nieder <jrnieder@xxxxxxxxx> writes: > >> Nguyen Thai Ngoc Duy wrote: >> >>> The test suite is currently more focused on >>> features than human readable output. >> >> Thanks for clarifying this. Yes, that's the point of the >> GETTEXT_POISON check. It is supposed to make sure that running git in >> another locale does not break features by modifying text that >> (internal and external) scripts parse. > > Correct. The most important thing to review in test scripts is that > tests that verify output from the plumbing commands are *not* marked > with GETTEXT_POISON (hence test_i18ncmp). IOW, storing "ls-files" > output and then checking it with expected result using test_i18ncmp > is *wrong*, as it won't catch mistakenly marking plumbing messages > with _() and N_(). The intention is good, but the execution is not. Requiring special flag to turn this feature on loses its value as normal "make test" does not catch stuff like this. We might want to turn this on by default (at least in the test suite), or LD_PRELOAD this feature in when the test suite is run. Or generate a poisoned .mo file, then make git use that. Another thing is GETTEXT_POISON poisons too much. printf(_("this is %s\n"), path); is turned to "# GETTEXT POISON #". There's no way for test scripts to verify the correct "path" output. Anyway I'll send a fixup patch later to make gettext poison test run pass again. -- Duy -- 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