Re: [PATCH v2] run-command: report exec failure
From: Junio C Hamano <hidden>
Date: 2018-12-13 08:17:07
Jeff King [off-list ref] writes:
On Thu, Dec 13, 2018 at 03:36:53AM +0900, Junio C Hamano wrote:quoted
test_expect_success 'start_command reports ENOENT (slash)' ' - test-tool run-command start-command-ENOENT ./does-not-exist + test-tool run-command start-command-ENOENT ./does-not-exist 2>err && + test_i18ngrep "\./does-not-exist" err 'I thought at first you could use "grep" here, since we know that the name of the file would appear untranslated. But I think the way GETTEXT_POISON works, it actually eats the whole string, including placeholders (which IMHO is a failing of GETTEXT_POISON, since no real translation would do that, but not worth caring too much about).
When Ævar's dynamic gettext poison topic was discussed, there was an idea or two floated for a possible follow-up to introduce a true "fake translation", replacing e with é, n with ñ, etc., while keeping the printf formaters intact. When that comes, we should be able to use grep and that would make the result more robust than the current test_i18ngrep that always pretends to have seen a match, but that hasn't happened yet.