(require 'cl-lib)
(require 'wanakana)


;; wanakana-romajip
(assert (wanakana-romajip "TÅ�kyÅ� and ÅŒsaka"))
(assert (wanakana-romajip "12a*b&c-d"))
(assert (not (wanakana-romajip "ã�‚ã‚¢A")))
(assert (not (wanakana-romajip "ã�Šé¡˜ã�„")))
;; å…¨è§’ã�®ï¼�ã‚’å¼¾ã��
(assert (not (wanakana-romajip "aï¼�b&cãƒ¼d")))

;; wanakana-japanesep
(assert (wanakana-japanesep "æ³£ã��è™«"))
(assert (wanakana-japanesep "ã�‚ã‚¢"))
;; ç®—ç”¨æ•°å­—ã�¯å…¨è§’å�Šè§’ä¸¡å¯¾å¿œ
(assert (wanakana-japanesep "ï¼’æœˆ1æ—¥"))
(assert (wanakana-japanesep "æ³£ã��è™«ã€‚ï¼�ã€œï¼„"))
;; å�Šè§’ã‚¢ãƒ«ãƒ•ã‚¡ãƒ™ãƒƒãƒˆã�«ã�¯ nil ã‚’è¿”ã�ˆã�™
(assert (not (wanakana-japanesep "æ³£ã��è™«.!~$")))
(assert (not (wanakana-japanesep "Aæ³£ã��è™«")))
(assert (not (wanakana-japanesep "A")))

;; wanakana-kanap
;; ã�²ã‚‰ã�Œã�ªã�¨ã‚«ã‚¿ã‚«ãƒŠ
(assert (wanakana-kanap "ã�‚"))
(assert (wanakana-kanap "ã‚¢"))
(assert (wanakana-kanap "ã�‚ãƒ¼ã‚¢"))
(assert (not (wanakana-kanap "A")))
(assert (not (wanakana-kanap "ã�‚Aã‚¢")))

;; wanakana-hiraganap
(assert (wanakana-hiraganap "ã�’ãƒ¼ã‚€"))
(assert (not (wanakana-hiraganap "A")))
(assert (not (wanakana-hiraganap "ã�‚ã‚¢")))

;; wanakana-katakanap
(assert (wanakana-katakanap "ã‚²ãƒ¼ãƒ "))
(assert (not (wanakana-katakanap "ã�‚")))
(assert (not (wanakana-katakanap "A")))
(assert (not (wanakana-katakanap "ã�‚ã‚¢")))

;; wanakana-kanjip
(assert (wanakana-kanjip "åˆ€"))
(assert (wanakana-kanjip "åˆ‡è…¹"))
(assert (not (wanakana-kanjip "å‹¢ã�„")))
(assert (not (wanakana-kanjip "ã�‚Aã‚¢")))
(assert (not (wanakana-kanjip "ğŸ¦€"))) ; èŸ¹ã�®çµµæ–‡å­—

;; wanakana-mixedp
;; ãƒ­ãƒ¼ãƒ�å­—ã�¨ã�‹ã�ªã�Œå�«ã�¾ã‚Œã�¦ã�„ã‚‹ã�‹ã�©ã�†ã�‹
;; ç¬¬2å¼•æ•°ã�§æ¼¢å­—ã‚’è¨±å�¯ã�™ã‚‹ã�‹ã‚’æŒ‡å®šã�™ã‚‹
(assert (wanakana-mixedp "ãƒ©ãƒ�ãƒ¼ã‚ºP" t))

(assert (wanakana-mixedp "Abã�‚ã‚¢"  t))
(assert (wanakana-mixedp "ã�Šè…¹A" t))
(assert (not (wanakana-mixedp "ã�Šè…¹A"  nil)))
(assert (not (wanakana-mixedp "ab"  t)))
(assert (not (wanakana-mixedp "ã�‚ã‚¢"  t)))

