1 # Copyright (C) 2020 all contributors <meta@public-inbox.org>
2 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
5 use PublicInbox::Config;
6 # see t/nntpd*.t for tests against a live NNTP server
8 use_ok 'PublicInbox::Watch';
9 my $nntp_url = \&PublicInbox::Watch::nntp_url;
10 is('news://example.com/inbox.foo',
11 $nntp_url->('NEWS://examplE.com/inbox.foo'), 'lowercased');
12 is('nntps://example.com/inbox.foo',
13 $nntp_url->('nntps://example.com/inbox.foo'), 'nntps:// accepted');
14 is('nntps://example.com/inbox.foo',
15 $nntp_url->('SNEWS://example.com/inbox.foo'), 'snews => nntps');