git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] Add C_LOCALE_OUTPUT prereq to test cases that require English text matching

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Jun 25, 2012, 11:45 UTC
Message-ID
<CACsJy8BMizkU+P6VPhkbY_q2tYY5=aY-GNHeDjBYN9-zg2nENQ@mail.gmail.com>
In-Reply-To
<CACsJy8DpOL+V=sVZt3B-7OQ=POHtu1bovFB-sQ9HwPpmdKmN-A@mail.gmail.com>
On Mon, Jun 25, 2012 at 6:32 PM, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
Show 20 quoted lines
>>> --- a/t/t0006-date.sh
>>> +++ b/t/t0006-date.sh
>>> @@ -9,7 +9,7 @@ TEST_DATE_NOW=1251660000; export TEST_DATE_NOW
>>>  check_show() {
>>>       t=$(($TEST_DATE_NOW - $1))
>>>       echo "$t -> $2" >expect
>>> -     test_expect_${3:-success} "relative date ($2)" "
>>> +     test_expect_${3:-success} C_LOCALE_OUTPUT "relative date ($2)" "
>>>       test-date show $t >actual &&
>>>       test_cmp expect actual
>>>       "
>>
>> Could use test_i18ncmp so we catch if test-date crashes, but anyway,
>> yeah, we can't expect to be able to meaningfully test date formatting
>> in another language.
>
> This reminds me of an inkscape crash I encountered long ago because of
> a mistake in Vietnamese translation. Too bad we can't test all locales
> for similar bugs (or we would need to i18n-ize expected results in the
> test suite too)

What if we allow to run the test suite in non-C locales and skip the tests that require C_LOCALE_OUTPUT? In non-C locales, we won't set C_LOCALE_OUTPUT prerequisite. This allows to test a localized git with ~90% of the test suite. Would it work?

-- 
Duy
Previous: Jonathan NiederNext: Jonathan Nieder
Message 6 of 11 in “i18n: leave \n out of translated diffstat”
  1. 1/2 i18n: leave \n out of translated diffstatNguyễn Thái Ngọc Duy, Jun 24, 2012
  2. 2/2 Add C_LOCALE_OUTPUT prereq to test cases that require English text matchingNguyễn Thái Ngọc Duy, Jun 24, 2012
  3. Jonathan NiederJun 24, 2012
  4. Nguyen Thai Ngoc DuyJun 25, 2012
  5. Jonathan NiederJun 25, 2012
  6. Nguyen Thai Ngoc DuyJun 25, 2012
  7. Jonathan NiederJun 25, 2012
  8. Jonathan NiederJun 24, 2012
  9. Junio C HamanoJun 25, 2012
  10. Nguyen Thai Ngoc DuyJun 25, 2012
  11. Jonathan NiederJun 25, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.