(test-utf7-decode-string-plus): New testcase.
[elisp/wanderlust.git] / tests / test-utf7.el
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 "="))))