From: kaoru Date: Sat, 1 Aug 2009 03:20:53 +0000 (+0000) Subject: (test-utf7-decode-string-plus): New testcase. X-Git-Tag: elmo-imap4-compliance-root~88 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=b36db589aba566a3fd553ae0d222435f521e7742;p=elisp%2Fwanderlust.git (test-utf7-decode-string-plus): New testcase. (test-utf7-decode-string-noconv): Ditto. (test-utf7-encode-string-plus): Ditto. (test-utf7-encode-string-noconv): Ditto. --- diff --git a/tests/ChangeLog b/tests/ChangeLog index 0b48861..97e653b 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -4,6 +4,11 @@ Fix (require 'utf7) order for Mule-UCS. Add coding: comment. + (test-utf7-decode-string-plus): New testcase. + (test-utf7-decode-string-noconv): Ditto. + (test-utf7-encode-string-plus): Ditto. + (test-utf7-encode-string-noconv): Ditto. + 2008-02-19 TAKAHASHI Kaoru * test-wl-util.el (test-wl-unique-id-by-user): New testcase. diff --git a/tests/test-utf7.el b/tests/test-utf7.el index 8ccd392..2846919 100644 --- a/tests/test-utf7.el +++ b/tests/test-utf7.el @@ -18,8 +18,43 @@ "+ZeVnLIqe-" (utf7-encode-string "日本語")))) ; FIXME!!: don't care coding system +(luna-define-method test-utf7-encode-string-plus ((case test-utf7)) + (lunit-assert + (string= "+-" (utf7-encode-string "+")))) + +(luna-define-method test-utf7-encode-string-noconv ((case test-utf7)) + (lunit-assert + (string= "" (utf7-encode-string ""))) + (lunit-assert + (string= "a" (utf7-encode-string "a"))) + (lunit-assert + (string= "-" (utf7-encode-string "-"))) + (lunit-assert + (string= "=" (utf7-encode-string "=")))) + + (luna-define-method test-utf7-decode-string ((case test-utf7)) (lunit-assert (string= "日本語" ; FIXME!!: don't care coding system (utf7-decode-string "+ZeVnLIqe-")))) + +(luna-define-method test-utf7-decode-string-plus ((case test-utf7)) + (lunit-assert + (string= "+" (utf7-decode-string "+-"))) + (lunit-assert + (string= "++" (utf7-decode-string "+-+-"))) + (lunit-assert + (string= "+++" (utf7-decode-string "+-+-+-"))) + (lunit-assert + (string= "++++" (utf7-decode-string "+-+-+-+-")))) + +(luna-define-method test-utf7-decode-string-noconv ((case test-utf7)) + (lunit-assert + (string= "" (utf7-decode-string ""))) + (lunit-assert + (string= "a" (utf7-decode-string "a"))) + (lunit-assert + (string= "-" (utf7-decode-string "-"))) + (lunit-assert + (string= "=" (utf7-encode-string "="))))