1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-21 12:10:26 +02:00
guile/module
Ludovic Courtès 4c7d1a64fa i18n: Fix corner cases for monetary and number string conversions.
Fixes <http://bugs.gnu.org/24990>.
Reported by Martin Michel <dev@famic.de>.

* module/ice-9/i18n.scm (integer->string, number-decimal-string): New
procedures.
(monetary-amount->locale-string): Use them instead of 'number->string'
followed by 'string-split'.
(number->locale-string): Likewise.
* test-suite/tests/i18n.test ("number->locale-string")["fraction"]: Add
second argument to 'number->locale-string'.
["fraction, 1 digit"]: Round up.
["fraction, 10 digits", "trailing zeros", "negative integer"]: New
tests.
* test-suite/tests/i18n.test ("format ~h"): Pass the number of decimals
for ~h.
("monetary-amount->locale-string")["French"]: Always expect two decimals
after the comma.
["one cent", "very little money"]: New tests.
* test-suite/tests/format.test ("~h localized number")["1234.5"]:
Specify the number of decimals explicitly.
["padding"]: Expect zero decimals.
["padchar"]: Ask for one decimal.
["decimals", "locale"]: Adjust rounding.
2017-03-01 21:16:25 +01:00
..
ice-9 i18n: Fix corner cases for monetary and number string conversions. 2017-03-01 21:16:25 +01:00
language Fix guild compile --to=cps / --from=cps 2017-02-23 11:37:44 +01:00
oop Fix class slot allocation since GOOPS rewrite 2017-03-01 15:37:05 +01:00
rnrs Flush when getting string from r6rs string output port 2017-03-01 14:26:11 +01:00
scripts Wire up `guild compile -O0 foo.scm' 2015-10-22 17:44:17 +00:00
srfi SRFI-18 mutexes are not recursive 2016-11-05 10:30:54 +01:00
sxml Remove duplicate definitions of call/ec' and let/ec'. 2013-04-06 15:40:19 +02:00
system Recognize sh3 as compilation targets 2017-03-01 21:04:31 +01:00
texinfo texinfo: Remove unnecessary (oop goops) dependency. 2017-03-01 19:28:04 +01:00
web http: Do not use 'eq?' to compare characters in parse-request-uri. 2017-03-01 19:50:37 +01:00
Makefile.am Add handle-interrupts inst and compiler pass 2016-11-16 22:55:45 +01:00
rnrs.scm Add R6RS bytevector->string, string->bytevector 2016-06-21 11:29:14 +02:00
statprof.scm Update statprof documentation; deprecate `with-statprof' 2016-02-01 15:12:36 +01:00
texinfo.scm texinfo: fix @url{@@} parsing 2014-11-09 15:56:33 +00:00