From: kaoru Date: Sat, 1 Aug 2009 05:00:44 +0000 (+0000) Subject: (test-utf7-decode-string-alpha): New testcase. X-Git-Tag: elmo-imap4-compliance-root~85 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb0842424227427c1337dd6abff2acbf3cf9d397;p=elisp%2Fwanderlust.git (test-utf7-decode-string-alpha): New testcase. (test-utf7-encode-string-alpha): Ditto. (test-utf7-decode-string-smiling-face): Ditto. (test-utf7-encode-string-smiling-face): Ditto. --- diff --git a/tests/ChangeLog b/tests/ChangeLog index 9f1cf8b..ade64ef 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -10,7 +10,10 @@ `test-utf7-decode-string'. Use `make-char'. (test-utf7-encode-string-nihongo): Rename from `test-utf7-encode-string'. Use `make-char'. - + (test-utf7-decode-string-alpha): New testcase. + (test-utf7-encode-string-alpha): Ditto. + (test-utf7-decode-string-smiling-face): Ditto. + (test-utf7-encode-string-smiling-face): Ditto. 2008-02-19 TAKAHASHI Kaoru diff --git a/tests/test-utf7.el b/tests/test-utf7.el index af56113..6d93943 100644 --- a/tests/test-utf7.el +++ b/tests/test-utf7.el @@ -20,6 +20,25 @@ (make-char 'japanese-jisx0208 75 92) (make-char 'japanese-jisx0208 56 108)))))) +(luna-define-method test-utf7-encode-string-smiling-face ((case test-utf7)) + (lunit-assert + (string= + "Hi Mom -+Jjo--!" + (utf7-encode-string + (concat "Hi Mom -" + (string (make-char 'mule-unicode-2500-33ff 35 58)) + "-!"))))) + +(luna-define-method test-utf7-encode-string-alpha ((case test-utf7)) + (lunit-assert + (string= + "A+ImIDkQ-." + (utf7-encode-string + (concat "A" + (string (make-char 'mule-unicode-0100-24ff 121 34) + (make-char 'mule-unicode-0100-24ff 38 113)) + "."))))) + (luna-define-method test-utf7-encode-string-plus ((case test-utf7)) (lunit-assert (string= "+-" (utf7-encode-string "+")))) @@ -43,6 +62,31 @@ (make-char 'japanese-jisx0208 56 108)) (utf7-decode-string "+ZeVnLIqe-")))) +(luna-define-method test-utf7-decode-string-smiling-face ((case test-utf7)) + (lunit-assert + (string= + (concat "Hi Mom -" + (string (make-char 'mule-unicode-2500-33ff 35 58)) + "-!") + (utf7-decode-string "Hi Mom -+Jjo--!")))) + +(luna-define-method test-utf7-decode-string-alpha ((case test-utf7)) + (lunit-assert + (string= + (concat "A" + (string (make-char 'mule-unicode-0100-24ff 121 34) + (make-char 'mule-unicode-0100-24ff 38 113)) + ".") + (utf7-decode-string "A+ImIDkQ."))) ; omit `-' + ;; + (lunit-assert + (string= + (concat "A" + (string (make-char 'mule-unicode-0100-24ff 121 34) + (make-char 'mule-unicode-0100-24ff 38 113)) + ".") + (utf7-decode-string "A+ImIDkQ-.")))) + (luna-define-method test-utf7-decode-string-plus ((case test-utf7)) (lunit-assert (string= "+" (utf7-decode-string "+-")))