Subject: Re: bug#38284: 27.0.50; [PATCH] Make auth-source-pass-search understand port lists

From: Damien Cassou <[email-masked]>
Date: Tue, 21 Jan 2020 20:25:08 +0100

Stefan Kangas <[email-masked]> writes:
> If the test is good, I think it should be installed.  Unfortunately,
> it seems like it doesn't apply cleanly to current master.
>
> Damien, could you please re-send the patch formatted by "git
> format-patch -1"?  Please also include a commit message with a
> ChangeLog entry as described in the CONTRIBUTE file.

The patch was only meant to be added to João's own patch. Here is a
standalone one.

-- 
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
>From 7e4c1aaa934f155e3aa3c69ba0a3460c1b6b90f3 Mon Sep 17 00:00:00 2001
From: Damien Cassou <[email-masked]>
Date: Tue, 21 Jan 2020 20:13:54 +0100
Subject: [PATCH] * test/lisp/auth-source-pass-tests.el: Test for multiple
 ports.

---
 test/lisp/auth-source-pass-tests.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/test/lisp/auth-source-pass-tests.el b/test/lisp/auth-source-pass-tests.el
index 10ed9c39fb..677abb33cc 100644
--- a/test/lisp/auth-source-pass-tests.el
+++ b/test/lisp/auth-source-pass-tests.el
@@ -353,6 +353,10 @@ auth-source-pass--matching-entries-find-entries-with-a-port
   (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"))
-- 
2.24.1