1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-02 08:22:22 +00:00

* test/lisp/auth-source-tests.el: Minor cleanups to use CL.

This commit is contained in:
Ted Zlatanov 2017-08-18 18:44:58 -04:00
parent 7098823b42
commit 9ff5edc713
No known key found for this signature in database
GPG Key ID: 11F23D0A4E4B9DEE

View File

@ -27,6 +27,7 @@
;;; Code:
(require 'ert)
(require 'cl)
(require 'auth-source)
(defvar secrets-enabled t
@ -266,20 +267,16 @@
: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)