1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

i18n: Add a couple of tests for `monetary-amount->locale-string'.

* test-suite/tests/i18n.test ("monetary-amount->locale-string"): New
  test prefix.
This commit is contained in:
Ludovic Courtès 2012-02-03 14:31:17 +01:00
parent a0919aefee
commit c76fdf69a8

View file

@ -479,3 +479,21 @@
(let ((fr (make-locale LC_ALL %french-locale-name)))
(string=? "1 234,5"
(number->locale-string 1234.567 1 fr))))))))
(with-test-prefix "monetary-amount->locale-string"
(with-test-prefix "French"
(pass-if "integer"
(under-french-locale-or-unresolved
(lambda ()
(let ((fr (make-locale LC_ALL %french-locale-name)))
(string=? "123 456 +EUR"
(monetary-amount->locale-string 123456 #f fr))))))
(pass-if "fraction"
(under-french-locale-or-unresolved
(lambda ()
(let ((fr (make-locale LC_ALL %french-locale-name)))
(string=? "1 234,56 EUR "
(monetary-amount->locale-string 1234.567 #t fr))))))))