X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fimap.t;h=aa262a196329f49d79808c7b4c951a6fb5ecc81f;hb=49175649b3e49cdd5f2ac857cb91e69a5b91a739;hp=451b6596bf9f8d08df021a385d597fcb8eebb807;hpb=509c2cc25c8f21b4e1685de8b475629559c9b2aa;p=public-inbox.git diff --git a/t/imap.t b/t/imap.t index 451b6596..aa262a19 100644 --- a/t/imap.t +++ b/t/imap.t @@ -8,9 +8,14 @@ use PublicInbox::IMAP; use PublicInbox::IMAPD; { # make sure we get '%' globbing right - my @n = map { { newsgroup => $_ } } (qw(x.y.z x.z.y)); + my @w; + local $SIG{__WARN__} = sub { push @w, @_ }; + my @n = map { { newsgroup => $_ } } (qw(x.y.z x.z.y IGNORE.THIS)); my $self = { imapd => { grouplist => \@n } }; PublicInbox::IMAPD::refresh_inboxlist($self->{imapd}); + is(scalar(@w), 1, 'got a warning for upper-case'); + like($w[0], qr/IGNORE\.THIS/, 'warned about upper-case'); + my $res = PublicInbox::IMAP::cmd_list($self, 'tag', 'x', '%'); is(scalar($$res =~ tr/\n/\n/), 2, 'only one result'); like($$res, qr/ x\r\ntag OK/, 'saw expected');