From: Edison IbaƱez Date: Tue, 7 Nov 2017 08:00:43 +0000 (+0100) Subject: * test/lisp/auth-source-pass-tests.el: Add assertions for host:port X-Git-Tag: emacs-27.0.90~4943 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=59d44b528e028192a7d3d576795a7957c92da682;p=emacs.git * test/lisp/auth-source-pass-tests.el: Add assertions for host:port --- diff --git a/test/lisp/auth-source-pass-tests.el b/test/lisp/auth-source-pass-tests.el index 86f59e51664..557a34ff596 100644 --- a/test/lisp/auth-source-pass-tests.el +++ b/test/lisp/auth-source-pass-tests.el @@ -166,11 +166,13 @@ This function is intended to be set to `auth-source-debug`." "host.com")))) (ert-deftest auth-source-pass-hostname () + (should (equal (auth-source-pass--hostname "https://foo.bar:443") "foo.bar")) (should (equal (auth-source-pass--hostname "https://foo.bar") "foo.bar")) (should (equal (auth-source-pass--hostname "http://foo.bar") "foo.bar")) (should (equal (auth-source-pass--hostname "https://SomeUser@foo.bar") "foo.bar"))) (ert-deftest auth-source-pass-hostname-with-user () + (should (equal (auth-source-pass--hostname-with-user "https://foo.bar:443") "foo.bar")) (should (equal (auth-source-pass--hostname-with-user "https://foo.bar") "foo.bar")) (should (equal (auth-source-pass--hostname-with-user "http://foo.bar") "foo.bar")) (should (equal (auth-source-pass--hostname-with-user "https://SomeUser@foo.bar") "SomeUser@foo.bar")))