about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-06-27 10:03:55 +0000
committerEric Wong <e@yhbt.net>2020-06-28 22:29:39 +0000
commit371e5e2f808af2e4726d0f1eb6f1f81ea7214ae9 (patch)
tree217f9f0273858d77015494a2688e3be1450ac5bf /t
parentb85909064e7209de45680150b5fb457736fa618d (diff)
downloadpublic-inbox-371e5e2f808af2e4726d0f1eb6f1f81ea7214ae9.tar.gz
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.
Diffstat (limited to 't')
-rw-r--r--t/watch_nntp.t6
1 files changed, 4 insertions, 2 deletions
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;