1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-22 14:01:47 -07:00

Add missing test cases to auth-source-pass-tests.el

* test/lisp/auth-source-pass-tests.el
(auth-source-pass-build-result-passes-full-host-to-find-match): Add
missing test cases.
This commit is contained in:
Damien Cassou 2017-11-07 09:48:50 +01:00 committed by Nicolas Petton
parent 5b31e6de99
commit a52661b58b
No known key found for this signature in database
GPG key ID: E8BCD7866AFCF978

View file

@ -209,7 +209,13 @@ This function is intended to be set to `auth-source-debug`."
(cl-letf (((symbol-function 'auth-source-pass--find-match)
(lambda (host _user) (setq passed-host host))))
(auth-source-pass--build-result "https://user@host.com:123" nil nil)
(should (equal passed-host "https://user@host.com:123")))))
(should (equal passed-host "https://user@host.com:123"))
(auth-source-pass--build-result "https://user@host.com" nil nil)
(should (equal passed-host "https://user@host.com"))
(auth-source-pass--build-result "user@host.com" nil nil)
(should (equal passed-host "user@host.com"))
(auth-source-pass--build-result "user@host.com:443" nil nil)
(should (equal passed-host "user@host.com:443")))))
(ert-deftest auth-source-pass-only-return-entries-that-can-be-open ()
(cl-letf (((symbol-function 'auth-source-pass-entries)