patch: Add test for international currency formatting

Petter Reinholdtsen pere@hungry.com
Sun Jun 22 10:28:00 GMT 2003


[Joseph S. Myers]
> If you're looking at strfmon in general: there are, or were, cases
> where left-justification ('-' flag) is handled improperly.

I might do that, so thanks for the references.  First I will look at
the formatting of international currency, and update the currently
broken locales which are revealed when the implementation is
corrected.

> Testcases in the examples in the standard
> <http://www.opengroup.org/onlinepubs/007904975/functions/strfmon.html>

Thanks.  I added the test cases to tst-fmon.data in my tree, and
discovered that the following fail (The rest are OK):

  # Disable the currency symbol
  en_US.ISO-8859-1	%!(#5n		123.45		   123.45
  en_US.ISO-8859-1	%!(#5n		3456.781	 3,456.78

  # Left-justify the output
  en_US.ISO-8859-1	%-14#5.4n	123.45		 $   123.4500 
  en_US.ISO-8859-1	%-14#5.4n	-123.45		-$   123.4500 
  en_US.ISO-8859-1	%-14#5.4n	3456.781	 $ 3,456.7810 

So, I guess glibc is broken in this regard too.



More information about the Libc-alpha mailing list