]> git.eshelyaron.com Git - emacs.git/commitdiff
* test/lisp/auth-source-pass-tests.el: Test for multiple ports.
authorDamien Cassou <damien@cassou.me>
Tue, 21 Jan 2020 19:13:54 +0000 (20:13 +0100)
committerStefan Kangas <stefankangas@gmail.com>
Wed, 22 Jan 2020 06:37:01 +0000 (07:37 +0100)
test/lisp/auth-source-pass-tests.el

index 10ed9c39fbb1573853d8c40ad560ab421bceb345..677abb33cc9f7fefb7713dfb9a2db574d6d1b2f0 100644 (file)
@@ -353,6 +353,10 @@ HOSTNAME, USER and PORT are passed unchanged to
   (auth-source-pass--with-store '(("bar.com:8080"))
     (should (auth-source-pass-match-entry-p "bar.com:8080" "bar.com" nil "8080"))))
 
+(ert-deftest auth-source-pass--matching-entries-find-entries-with-a-port-when-passed-multiple-ports ()
+  (auth-source-pass--with-store '(("bar.com:8080"))
+    (should (auth-source-pass-match-entry-p "bar.com:8080" "bar.com" nil '("http" "https" "80" "8080")))))
+
 (ert-deftest auth-source-pass--matching-entries-find-entries-with-slash ()
   ;; match if entry filename matches user
   (auth-source-pass--with-store '(("foo.com/user"))