New feature: toggle visibility of mime buttons.
[more-wl.git] / tests / check-base64.el
blob57cefd5609a21b3dbf437b0de62342d48d44ace7
1 (require 'lunit)
3 (luna-define-class check-base64 (lunit-test-case))
5 ;; mel-b-ccl on XEmacs 21.1
6 ;; <http://lists.airs.net/wl/archive/200101/msg00075.html>
7 (luna-define-method test-base64-encode-1 ((case check-base64))
8 (require 'elmo-util)
9 (lunit-assert
10 (string=
11 "QQ=="
12 (elmo-base64-encode-string "A"))))
14 (luna-define-method test-base64-encode-2 ((case check-base64))
15 (require 'elmo-util)
16 (lunit-assert
17 (string=
18 "QUE="
19 (elmo-base64-encode-string "AA"))))
21 (luna-define-method test-base64-encode-3 ((case check-base64))
22 (require 'elmo-util)
23 (lunit-assert
24 (string=
25 "QUFB"
26 (elmo-base64-encode-string "AAA"))))
28 ;; Old base64 module on XEmacs 21.1
29 ;; <http://lists.airs.net/wl/archive/200104/msg00150.html>
30 (defun check-base64-encode-string-has-no-line-break-argument ()
31 (require 'elmo-util)
32 (condition-case nil
33 (elmo-base64-encode-string "" t)
34 (wrong-number-of-arguments)))
36 (luna-define-method test-base64-encode-4 ((case check-base64))
37 (lunit-assert
38 (check-base64-encode-string-has-no-line-break-argument)))
40 ;; <http://lists.airs.net/wl/archive/200107/msg00121.html>
42 (defun check-base64-encode-region-has-no-line-break-argument ()
43 (require 'mel)
44 (condition-case nil
45 (with-temp-buffer
46 (funcall (mel-find-function 'mime-encode-region "base64")
47 (point-min) (point-max) t)
49 (wrong-number-of-arguments)))
51 (luna-define-method test-base64-encode-5 ((case check-base64))
52 (lunit-assert
53 (check-base64-encode-region-has-no-line-break-argument)))