* tests/test-sasl.el: New file.
authorueno <ueno>
Fri, 10 Nov 2000 06:43:39 +0000 (06:43 +0000)
committerueno <ueno>
Fri, 10 Nov 2000 06:43:39 +0000 (06:43 +0000)
tests/test-sasl.el [new file with mode: 0644]

diff --git a/tests/test-sasl.el b/tests/test-sasl.el
new file mode 100644 (file)
index 0000000..e911deb
--- /dev/null
@@ -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,")))