From 5ee76ac04967f311c329af6867dd569dbfb6888f Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Tue, 7 Nov 2017 09:48:50 +0100 Subject: [PATCH 05/14] 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. --- test/lisp/auth-source-pass-tests.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/lisp/auth-source-pass-tests.el b/test/lisp/auth-source-pass-tests.el index 2ddbcab233..6d471f4e34 100644 --- a/test/lisp/auth-source-pass-tests.el +++ b/test/lisp/auth-source-pass-tests.el @@ -209,7 +209,13 @@ auth-source-pass--with-store-find-foo (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) -- 2.17.0