X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=blobdiff_plain;f=t%2Fpop3d.t;h=9eb110d6879f0d86d7d1e5931d73d25df7a4a3b0;hp=3d70935fa69d162db37e5ffef1b0906a839f5454;hb=f40f4695c0cb576a4e00819da45c1bea8f548aec;hpb=6d01d5b60dbfc3319092cebdda7c3a371eafbbc6 diff --git a/t/pop3d.t b/t/pop3d.t index 3d70935f..9eb110d6 100644 --- a/t/pop3d.t +++ b/t/pop3d.t @@ -106,6 +106,8 @@ for my $args ( my @p3s_args = ($pop3s->sockhost, Port => $pop3s->sockport, SSL => 1, %o); my $p3s = Net::POP3->new(@p3s_args); + my $capa = $p3s->capa; + ok(!exists $capa->{STLS}, 'no STLS CAPA for POP3S'); ok($p3s->quit, 'QUIT works w/POP3S'); { $p3s = Net::POP3->new(@p3s_args); @@ -127,7 +129,11 @@ for my $args ( my $np3 = Net::POP3->new(@np3_args); ok($np3->quit, 'plain QUIT works'); $np3 = Net::POP3->new(@np3_args, %o); + $capa = $np3->capa; + ok(exists $capa->{STLS}, 'STLS CAPA advertised before STLS'); ok($np3->starttls, 'STLS works'); + $capa = $np3->capa; + ok(!exists $capa->{STLS}, 'STLS CAPA not advertised after STLS'); ok($np3->quit, 'QUIT works after STLS'); for my $mailbox (('x'x32)."\@$group", $group, ('a'x32)."\@z.$group") { @@ -239,6 +245,7 @@ EOF my $capa = $oldc->capa; ok(defined($capa->{PIPELINING}), 'pipelining supported by CAPA'); is($capa->{EXPIRE}, 0, 'EXPIRE 0 set'); + ok(!exists $capa->{STLS}, 'STLS unset w/o daemon certs'); # ensure TOP doesn't trigger "EXPIRE 0" like RETR does (cf. RFC2449) my $list = $oldc->list;