From 1284fd11b059fb98617bed77f08b45cce525e4ba Mon Sep 17 00:00:00 2001 From: ueno Date: Fri, 10 Nov 2000 06:43:39 +0000 Subject: [PATCH] * tests/test-sasl.el: New file. --- tests/test-sasl.el | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/test-sasl.el 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,"))) -- 1.7.10.4