(test-utf7-decode-string-plus): New testcase.
authorkaoru <kaoru>
Sat, 1 Aug 2009 03:20:53 +0000 (03:20 +0000)
committerkaoru <kaoru>
Sat, 1 Aug 2009 03:20:53 +0000 (03:20 +0000)
(test-utf7-decode-string-noconv): Ditto.
(test-utf7-encode-string-plus): Ditto.
(test-utf7-encode-string-noconv): Ditto.

tests/ChangeLog
tests/test-utf7.el

index 0b48861..97e653b 100644 (file)
@@ -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  <kaoru@kaisei.org>
 
        * test-wl-util.el (test-wl-unique-id-by-user): New testcase.
index 8ccd392..2846919 100644 (file)
     "+ZeVnLIqe-"
     (utf7-encode-string "\e$BF|K\8l\e(B"))))     ; 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=
     "\e$BF|K\8l\e(B"                             ; 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 "="))))