diff options
author | Ludovic Courtès <ludo@gnu.org> | 2012-02-03 14:31:17 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2012-02-03 14:31:17 +0100 |
commit | c76fdf69a833378ce18228d242e926009df9add1 (patch) | |
tree | 4c8e6db69d18811758efd4d517c34d082f4efadc | |
parent | a0919aefee7512686c3374876df2c549fd47e071 (diff) | |
download | guile-c76fdf69a833378ce18228d242e926009df9add1.tar.gz |
i18n: Add a couple of tests for `monetary-amount->locale-string'.
* test-suite/tests/i18n.test ("monetary-amount->locale-string"): New
test prefix.
-rw-r--r-- | test-suite/tests/i18n.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test-suite/tests/i18n.test b/test-suite/tests/i18n.test index d1b0a542b..f7824d39b 100644 --- a/test-suite/tests/i18n.test +++ b/test-suite/tests/i18n.test @@ -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)))))))) |