]> git.eshelyaron.com Git - emacs.git/commitdiff
* test/lisp/auth-source-tests.el: Minor cleanups to use CL.
authorTed Zlatanov <tzz@lifelogs.com>
Fri, 18 Aug 2017 22:44:58 +0000 (18:44 -0400)
committerTed Zlatanov <tzz@lifelogs.com>
Fri, 18 Aug 2017 22:46:19 +0000 (18:46 -0400)
test/lisp/auth-source-tests.el

index eb56e94af2cfc66afa8dc9a121be85f44361e6c2..99d830c6b06aebd8e5e62a11b75d8f9e28ff9ea7 100644 (file)
@@ -27,6 +27,7 @@
 ;;; Code:
 
 (require 'ert)
+(require 'cl)
 (require 'auth-source)
 
 (defvar secrets-enabled t
                    :host "b1" :port "b2" :user "b3")
                   ))
 
-         (text (string-join entries "\n"))
          (netrc-file (make-temp-file
                       "auth-source-test"
                       nil nil
                       (string-join entries "\n")))
          (auth-sources (list netrc-file))
-         (auth-source-do-cache nil))
+         (auth-source-do-cache nil)
+         found found-as-string)
 
     (dolist (test tests)
-      (let ((testname (car test))
-            (needed (cadr test))
-            (parameters (cddr test))
-            found found-as-string)
-
+      (cl-destructuring-bind (testname needed &rest parameters) test
         (setq found (apply #'auth-source-search parameters))
         (when (listp found)
           (dolist (f found)