1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-04 00:30:30 +02:00

i18n: add tests for locale-digit-grouping

* test-suite/tests/i18n.test ("nl-langinfo et al."): new tests
This commit is contained in:
Mike Gran 2017-03-20 07:38:12 -07:00
parent 7c7cc11810
commit 726804874f

View file

@ -504,6 +504,26 @@
(not (not (member (locale-pm-string %greek-utf8-locale) (not (not (member (locale-pm-string %greek-utf8-locale)
'("ΜΜ" "μμ" "Μ.Μ." "μ.μ."))))))) '("ΜΜ" "μμ" "Μ.Μ." "μ.μ.")))))))
(pass-if "locale-digit-grouping"
;; In the C locale, there is no rule for grouping.
(null? (locale-digit-grouping)))
(pass-if "locale-digit-grouping (French)"
(under-french-locale-or-unresolved
(lambda ()
;; All systems that have a GROUPING nl_item should know
;; that French numbers are grouped in 3 digit chunks.
;; Those systems that have no GROUPING nl_item may use
;; the hard-coded default of no grouping.
(let ((result (locale-digit-grouping %french-locale)))
(cond
((null? result)
(throw 'unresolved))
((eqv? 3 (false-if-exception (car result)))
#t)
(else
#f))))))
(pass-if "locale-monetary-grouping" (pass-if "locale-monetary-grouping"
;; In the C locale, there is no rule for grouping of digits ;; In the C locale, there is no rule for grouping of digits
;; of monetary values. ;; of monetary values.