about summary refs log tree commit
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>1997-11-28 21:16:22 +0000
committerGraham Barr <gbarr@pobox.com>1997-11-28 21:16:22 +0000
commitdf47d9317a43ad46cb2485b9f9135e95ff2e25ce (patch)
treeb685d6db645db3fb8e5e24cf2518f0529c1dac47
parent753b6cc47ce68347795eb16f500a32e584048c36 (diff)
downloadperl-libnet-df47d9317a43ad46cb2485b9f9135e95ff2e25ce.tar.gz
t/nntp.t
- Now exits passing if commands fail due to not having
  authorization.

-rw-r--r--t/nntp.t10
1 files changed, 9 insertions, 1 deletions
diff --git a/t/nntp.t b/t/nntp.t
index 5888b16..1afb588 100644
--- a/t/nntp.t
+++ b/t/nntp.t
@@ -2,10 +2,11 @@
 
 use Net::Config;
 use Net::NNTP;
+use Net::Cmd qw(CMD_REJECT);
 
 unless(@{$NetConfig{nntp_hosts}} && $NetConfig{test_hosts}) {
     print "1..0\n";
-    exit 0;
+    exit;
 }
 
 print "1..4\n";
@@ -22,6 +23,13 @@ foreach $grp (qw(test alt.test control news.announce.newusers)) {
     @grp = $nntp->group($grp);
     last if @grp;
 }
+
+if($nntp->status == CMD_REJECT) {
+    # Command was rejected, probably because we need authinfo
+    map { print "ok ",$_,"\n" } 2,3,4;
+    exit;
+}
+
 print "not " unless @grp;
 print "ok 2\n";