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

Fix i18n tests when no French locale is available.

* test-suite/tests/i18n.test ("number->locale-string")["French"]: Move
  `under-french-locale-or-unresolved' within each `pass-if'.
This commit is contained in:
Ludovic Courtès 2010-08-16 12:27:14 +02:00
parent b6dcf01abc
commit 252f9f187a

View file

@ -391,16 +391,21 @@
(with-test-prefix "French"
(under-french-locale-or-unresolved
(lambda ()
(let ((fr (make-locale LC_ALL %french-locale-name)))
(pass-if "integer"
(under-french-locale-or-unresolved
(lambda ()
(let ((fr (make-locale LC_ALL %french-locale-name)))
(string=? "123 456" (number->locale-string 123456 #t fr))))))
(pass-if "integer"
(string=? "123 456" (number->locale-string 123456 #t fr)))
(pass-if "fraction"
(under-french-locale-or-unresolved
(lambda ()
(let ((fr (make-locale LC_ALL %french-locale-name)))
(string=? "1 234,567" (number->locale-string 1234.567 #t fr))))))
(pass-if "fraction"
(string=? "1 234,567" (number->locale-string 1234.567 #t fr)))
(pass-if "fraction, 1 digit"
(string=? "1 234,5"
(number->locale-string 1234.567 1 fr))))))))
(pass-if "fraction, 1 digit"
(under-french-locale-or-unresolved
(lambda ()
(let ((fr (make-locale LC_ALL %french-locale-name)))
(string=? "1 234,5"
(number->locale-string 1234.567 1 fr))))))))