]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/nntpd.t
t/nntpd*.t: require IO::Socket::SSL 2.007 for Net::NNTP tests
[public-inbox.git] / t / nntpd.t
index 0e59de07ed5315166557258bcdf804469d2d50d6..fdb4bee42b639554d4c093ecb6a374c880d053fa 100644 (file)
--- a/t/nntpd.t
+++ b/t/nntpd.t
@@ -104,6 +104,10 @@ EOF
        SKIP: {
                $n->can('starttls') or
                        skip('Net::NNTP too old to support STARTTLS', 2);
+               eval {
+                       require IO::Socket::SSL;
+                       IO::Socket::SSL->VERSION(2.007);
+               } or skip('IO::Socket::SSL <2.007 not supported by Net::NNTP');
                ok(!$n->starttls, 'STARTTLS fails when unconfigured');
                is($n->code, 580, 'got 580 code on server w/o TLS');
        };
@@ -143,6 +147,11 @@ EOF
                'got greeting');
        $s->autoflush(1);
 
+       syswrite($s, "CAPABILITIES\r\n");
+       $buf = read_til_dot($s);
+       like($buf, qr/\r\nVERSION 2\r\n/s, 'CAPABILITIES works');
+       unlike($buf, qr/STARTTLS/s, 'STARTTLS not advertised');
+
        syswrite($s, "NEWGROUPS 19990424 000000 GMT\r\n");
        $buf = read_til_dot($s);
        like($buf, qr/\A231 list of /, 'newgroups OK');