guile-uniseg/tests/test-eastasian-locale.scm

27 lines
597 B
Scheme
Raw Normal View History

(define-module (tests test-eastasian-locale)
2024-03-03 18:13:22 +00:00
#:use-module (uniseg eastasian locale)
#:use-module (srfi srfi-64))
(test-begin "test-eastasian-locale")
2024-03-04 01:33:12 +00:00
(define (test-eastasian-locale expected charset)
(test-equal
(format #f "check ~a" charset)
expected
(eastasian-locale? charset)))
(define data
'((#f "foo@cjk_narrow")
(#f "foo@cjk")
(#f "utf-8@cjk")
(#f "C")
(#f "POSIX")
(#f "C.UTF-8")
(#t "ja_JP.UTF-8")
(#t "ja_JP.CP932")
(#f "en_US.UTF-8")))
2024-03-04 01:33:12 +00:00
(for-each (λ (p) (apply test-eastasian-locale p)) data)
(test-end "test-eastasian-locale")