From: kaoru Date: Thu, 19 Feb 2004 12:57:45 +0000 (+0000) Subject: New testcases. Add docstring. X-Git-Tag: wl-2_11_25~53 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=05bd8031d59a6ec6fe80ef586cc6031484caa9ed;p=elisp%2Fwanderlust.git New testcases. Add docstring. --- diff --git a/tests/ChangeLog b/tests/ChangeLog index 4f803ff..847ca1d 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -9,8 +9,13 @@ (test-elmo-list-insert-2, test-elmo-delete-char-1) (test-elmo-concat-path-1) (test-elmo-remove-passwd-1, test-elmo-remove-passwd-2) - (test-elmo-remove-passwd-3, test-elmo-passwd-alist-clear-1): New - testcases. Add docstring. + (test-elmo-remove-passwd-3, test-elmo-passwd-alist-clear-1) + (test-elmo-address-quote-specials-1) + (test-elmo-address-quote-specials-2, test-elmo-elmo-flatten-1) + (test-elmo-number-set-member-1, test-elmo-number-set-append-list-1) + (test-elmo-number-set-append-1) + (test-elmo-number-set-to-number-list-1): New testcases. Add + docstring. 2004-02-18 TAKAHASHI Kaoru diff --git a/tests/test-elmo-util.el b/tests/test-elmo-util.el index a044358..d9d0aa5 100644 --- a/tests/test-elmo-util.el +++ b/tests/test-elmo-util.el @@ -165,3 +165,58 @@ (string= "\0\0\0\0\0\0\0\0" password1)) (lunit-assert (string= "\0\0\0\0\0\0\0\0" password2)))) + +(luna-define-method test-elmo-address-quote-specials-1 ((case test-elmo-util)) + "" + (lunit-assert + (string= "\"dot.atom.text\"" + (elmo-address-quote-specials "dot.atom.text"))) + (lunit-assert + (string= "\"...\"" + (elmo-address-quote-specials "...")))) + +(luna-define-method test-elmo-address-quote-specials-2 ((case test-elmo-util)) + "" + (lunit-assert + (string= + "atext!#$%&'*+-/=?^_`{|}~" + (elmo-address-quote-specials "atext!#$%&'*+-/=?^_`{|}~")))) + +(luna-define-method test-elmo-elmo-flatten-1 ((case test-elmo-util)) + "" + (lunit-assert + (equal + '(1 2 3 4 5) + (elmo-flatten '(1 2 (3 4 5)))))) + +(luna-define-method test-elmo-number-set-member-1 ((case test-elmo-util)) + "Check edge" + (lunit-assert + (elmo-number-set-member 1 '((1 . 99)))) + (lunit-assert + (elmo-number-set-member 99 '((1 . 99)))) + (lunit-assert + (not (elmo-number-set-member 0 '((1 . 99))))) + (lunit-assert + (not (elmo-number-set-member 100 '((1 . 99)))))) + +(luna-define-method test-elmo-number-set-append-list-1 ((case test-elmo-util)) + "Simple testcase." + (lunit-assert + (equal '((1 . 100)) + (elmo-number-set-append-list '((1 . 99)) '(100))))) + +(luna-define-method test-elmo-number-set-append-1 ((case test-elmo-util)) + "Simple testcase." + (lunit-assert + (equal '((1 . 100)) + (elmo-number-set-append '((1 . 99)) 100)))) + +(luna-define-method test-elmo-number-set-to-number-list-1 ((case test-elmo-util)) + "Simple testcase." + (lunit-assert + (equal '(1 2 3 4 5 6 7 8 9) + (elmo-number-set-to-number-list '((1 . 9))))) + (lunit-assert + (equal '(1) + (elmo-number-set-to-number-list '(1)))))