diff options
author | Graham Barr <gbarr@pobox.com> | 1997-11-28 21:16:22 +0000 |
---|---|---|
committer | Graham Barr <gbarr@pobox.com> | 1997-11-28 21:16:22 +0000 |
commit | df47d9317a43ad46cb2485b9f9135e95ff2e25ce (patch) | |
tree | b685d6db645db3fb8e5e24cf2518f0529c1dac47 | |
parent | 753b6cc47ce68347795eb16f500a32e584048c36 (diff) | |
download | perl-libnet-df47d9317a43ad46cb2485b9f9135e95ff2e25ce.tar.gz |
t/nntp.t
- Now exits passing if commands fail due to not having authorization.
-rw-r--r-- | t/nntp.t | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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"; |