]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/nntpd.t
t/nntpd*.t: skip TLS tests for old Net::NNTP
[public-inbox.git] / t / nntpd.t
index 6cba2be435089207d7ad8a33d76b23f11d417461..bf5bb883f728dcb8f500ff67b831962e8b40c174 100644 (file)
--- a/t/nntpd.t
+++ b/t/nntpd.t
@@ -106,8 +106,13 @@ EOF
        is_deeply($list, { $group => [ qw(1 1 n) ] }, 'LIST works');
        is_deeply([$n->group($group)], [ qw(0 1 1), $group ], 'GROUP works');
        is_deeply($n->listgroup($group), [1], 'listgroup OK');
-       ok(!$n->starttls, 'STARTTLS fails when unconfigured');
-       is($n->code, 580, 'got 580 code on server w/o TLS');
+
+       SKIP: {
+               $n->can('starttls') or
+                       skip('Net::NNTP too old to support STARTTLS', 2);
+               ok(!$n->starttls, 'STARTTLS fails when unconfigured');
+               is($n->code, 580, 'got 580 code on server w/o TLS');
+       };
 
        %opts = (
                PeerAddr => $host_port,