From 5c9fea27af804cd4afeea4a705ad23db8bc5b16e Mon Sep 17 00:00:00 2001 From: Nathan Wagner Date: Fri, 2 Dec 2011 04:34:50 -0500 Subject: [PATCH] Added some test targets. --- Makefile | 10 +++++++++- Net-Server-NNTP/lib/Net/Server/NNTP.pm | 9 +-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 5f4ae7e..306b50b 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,15 @@ test: rm -f news.log PERL5LIB=./Net-Server-NNTP/lib ./newsd conf_file=test.conf sleep 1 - prove t/*.t + -prove t/*.t + -test -f newsd.pid && kill `cat newsd.pid` + +vtest: + -test -f newsd.pid && kill `cat newsd.pid` + rm -f news.log + PERL5LIB=./Net-Server-NNTP/lib ./newsd conf_file=test.conf + sleep 1 + -prove -v t/*.t -test -f newsd.pid && kill `cat newsd.pid` schema: diff --git a/Net-Server-NNTP/lib/Net/Server/NNTP.pm b/Net-Server-NNTP/lib/Net/Server/NNTP.pm index 63c37b0..5476548 100644 --- a/Net-Server-NNTP/lib/Net/Server/NNTP.pm +++ b/Net-Server-NNTP/lib/Net/Server/NNTP.pm @@ -62,13 +62,6 @@ Perhaps a little code snippet. my $foo = Net::Server::NNTP->new(); ... -=head1 EXPORT - -Nothing is exported. - -A list of functions that can be exported. You can delete this section if -you don't export anything, such as for a purely object-oriented module. - =cut our $article_re = qr/\<[^\s\>]+\@[^\s\>]+\>/; # rfc 1036 2.1.5 @@ -407,9 +400,9 @@ sub stat { $s->article_number($n); } elsif (!@args) { ($g, $n) = $s->pointer; - $s->log(4, "fetching ($g $n)"); return $s->response(412) unless defined $g; return $s->response(420) unless defined $n; + $s->log(4, "fetching ($g $n)"); $id = $s->fetch_stat($g,$n); return $s->response(420) unless defined $id; } else { -- 2.40.0