From 371e5e2f808af2e4726d0f1eb6f1f81ea7214ae9 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 27 Jun 2020 10:03:55 +0000 Subject: watch: show user-specified URL consistently. Since we use the non-ref scalar URL in many error messages, favor keeping the unblessed URL in the long-lived process. This avoids showing "snews://" to users who've specified "nntps://" URLs, since "nntps" is IANA-registered nowadays and what we show in our documentation, while "snews" was just a draft the URI package picked up decades ago. --- t/watch_nntp.t | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 't') diff --git a/t/watch_nntp.t b/t/watch_nntp.t index f919930e..98fb1161 100644 --- a/t/watch_nntp.t +++ b/t/watch_nntp.t @@ -9,7 +9,9 @@ use_ok 'PublicInbox::WatchMaildir'; my $nntp_url = \&PublicInbox::WatchMaildir::nntp_url; is('news://example.com/inbox.foo', $nntp_url->('NEWS://examplE.com/inbox.foo'), 'lowercased'); -is('snews://example.com/inbox.foo', - $nntp_url->('nntps://example.com/inbox.foo'), 'nntps:// is snews://'); +is('nntps://example.com/inbox.foo', + $nntp_url->('nntps://example.com/inbox.foo'), 'nntps:// accepted'); +is('nntps://example.com/inbox.foo', + $nntp_url->('SNEWS://example.com/inbox.foo'), 'snews => nntps'); done_testing; -- cgit v1.2.3-24-ge0c7