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:
parent
a0919aefee
commit
c76fdf69a8
1 changed files with 18 additions and 0 deletions
|
@ -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))))))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue