From: ueno Date: Fri, 10 Nov 2000 06:43:39 +0000 (+0000) Subject: * tests/test-sasl.el: New file. X-Git-Tag: deisui-1_14_0-2000-12-14~25 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=1284fd11b059fb98617bed77f08b45cce525e4ba;p=elisp%2Fflim.git * tests/test-sasl.el: New file. --- diff --git a/tests/test-sasl.el b/tests/test-sasl.el new file mode 100644 index 0000000..e911deb --- /dev/null +++ b/tests/test-sasl.el @@ -0,0 +1,21 @@ +(require 'lunit) +(require 'sasl) + +(luna-define-class test-sasl (lunit-test-case)) + +(luna-define-method test-sasl-find-mechanism ((case test-sasl)) + (let ((mechanisms sasl-mechanisms)) + (while mechanisms + (let* ((sasl-mechanisms (list (car mechanisms)))) + (lunit-assert + (sasl-find-mechanism (list (car mechanisms))))) + (setq mechanisms (cdr mechanisms))))) + +(luna-define-method test-sasl-digest-md5-build-response-value ((case test-sasl)) + (require 'sasl-digest) + (lunit-assert + (string= + (sasl-digest-md5-build-response-value + "chris" "elwood.innosoft.com" "secret" "OA9BSXrbuRhWay" "OA9BSuZWMSpW8m" 1 + (sasl-digest-md5-digest-uri "acap" "elwood.innosoft.com")) + "username=\"chris\",realm=\"elwood.innosoft.com\",nonce=\"OA9BSXrbuRhWay\",nc=00000001,cnonce=\"OA9BSuZWMSpW8m\",digest-uri=\"acap/elwood.innosoft.com\",response=6084c6db3fede7352c551284490fd0fc,")))