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

Re: [PATCH/RFC] Change t0204-gettext-reencode-sanity.sh to pass under Mac OSX

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 5, 2012, 20:39 UTC
Message-ID
<7vzkbuzss7.fsf@alter.siamese.dyndns.org>
In-Reply-To
<201203052039.16893.tboegi@web.de>
Torsten Bögershausen <tboegi@web.de> writes:

Swapping to: and cc: as Torsten is not the primary "guilty party" on this one.

Show 7 quoted lines
> t0204 tries to use a ISO-8859-1 locale and expects that characters
> outside the ISO-8859-1 code range are converted in "question marks".
>
> The gettext under Mac OS X ignores the ISO-8859-1 locale and uses
> UTF-8 anyway.
> ...
> Let the test pass when UTF-8 is returned.

This is insane. Is passing this test *that* important to the point that you would need to change the passing criteria, instead of fixing the behaviour of the code being tested?

It looks like these tests prepare *.mo files based on UTF-8 *.po files, and ask the system iconv machinery to show them in UTF-8 and non UTF-8 locales. And the conversion is an impossible one in this case, as the messages won't fit in iso-8859-1.

Some platforms may be capable of noticing that and fill them with question marks, and some others may notice the impossible request but do something other than "question marks", and yet some others may not even notice iso-8859-1 is requested and spit out the original UTF-8 verbatim.

I do not see any reason to insist that their fallback behaviour must be to fill them with question marks. In other words, I simply do not see the point of this test and the original "pass runs of question" to begin with, and this patch makes things even worse.

Why not get rid of this single test that only tries to check the output for an impossible request?

Ævar, am I missing something?
Previous: Torsten BögershausenNext: Ævar Arnfjörð Bjarmason
Message 2 of 25 in “Change t0204-gettext-reencode-sanity.sh to pass under Mac OSX”
  1. Change t0204-gettext-reencode-sanity.sh to pass under Mac OSXTorsten Bögershausen, Mar 5, 2012
  2. Junio C HamanoMar 5, 2012
  3. Ævar Arnfjörð BjarmasonMar 7, 2012
  4. Junio C HamanoMar 7, 2012
  5. Ævar Arnfjörð BjarmasonMar 7, 2012
  6. Junio C HamanoMar 7, 2012
  7. Ævar Arnfjörð BjarmasonMar 7, 2012
  8. Junio C HamanoMar 7, 2012
  9. Junio C HamanoMar 7, 2012
  10. Torsten BögershausenMar 8, 2012
  11. Johannes SixtMar 8, 2012
  12. Torsten BögershausenMar 8, 2012
  13. Torsten BögershausenMar 8, 2012
  14. Re*: [PATCH/RFC] Change t0204-gettext-reencode-sanity.sh to pass under Mac OSXJunio C Hamano, Mar 9, 2012
  15. Torsten BögershausenMar 10, 2012
  16. Junio C HamanoMar 11, 2012
  17. Torsten BögershausenMar 11, 2012
  18. Junio C HamanoMar 11, 2012
  19. Torsten BögershausenMar 11, 2012
  20. Junio C HamanoMar 11, 2012
  21. Torsten BögershausenMar 12, 2012
  22. Junio C HamanoMar 12, 2012
  23. Torsten BögershausenMar 13, 2012
  24. Junio C HamanoMar 13, 2012
  25. Junio C HamanoMar 12, 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.