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

From: Damien Cassou <[email-masked]>
Date: Fri, 22 Nov 2019 09:49:20 +0100

Hi João,

João Távora <[email-masked]> writes:
>> can you please rename "d" to "domain"?
>
> ok.  I do call your attention that it was already the
> single letter n there

yes I saw. This should never have been merged like that. Thank you for
improving the code.

>> Can you please add a unit test covering this new use-case?
>
> No. This is too much work for such a trivial change

I care a lot about the automated testing of the code I write. I won't
try to convince you though. Can you please merge the attached patch with
yours?

-- 
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
>From afd2ebb80c80573447ec1dc23bc1625f9b41046a Mon Sep 17 00:00:00 2001
From: Damien Cassou <[email-masked]>
Date: Fri, 22 Nov 2019 09:36:44 +0100
Subject: [PATCH] WIP

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

diff --git a/test/auth-source-pass-tests.el b/test/auth-source-pass-tests.el
index bec42a5..ed1752d 100644
--- a/test/auth-source-pass-tests.el
+++ b/test/auth-source-pass-tests.el
@@ -353,6 +353,10 @@ (ert-deftest 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.23.0