2024-03-02 18:59:31 +00:00
|
|
|
(define-module (tests test-eastasian-locale)
|
|
|
|
#:use-module (runewidth eastasian locale)
|
2024-02-29 20:17:43 +00:00
|
|
|
#:use-module (srfi srfi-64))
|
|
|
|
|
2024-03-02 18:59:31 +00:00
|
|
|
(test-begin "test-eastasian-locale")
|
2024-02-29 20:17:43 +00:00
|
|
|
|
|
|
|
(define (test-east expected charset)
|
2024-03-02 18:59:31 +00:00
|
|
|
(test-equal
|
|
|
|
(format #f "check ~a" charset)
|
|
|
|
expected
|
|
|
|
(eastasian-locale? charset)))
|
2024-02-29 20:17:43 +00:00
|
|
|
|
|
|
|
(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")))
|
|
|
|
|
|
|
|
(for-each (λ (p) (apply test-east p)) data)
|
|
|
|
|
2024-03-02 18:59:31 +00:00
|
|
|
(test-end "test-eastasian-locale")
|