added pod coverage test
This commit is contained in:
parent
6707c3698a
commit
5b9f994b50
2 changed files with 69 additions and 2 deletions
|
|
@ -45,7 +45,8 @@ if ($] >= 5.006) {
|
|||
checkModule("LWP",5.80);
|
||||
checkModule("HTTP::Request",1.40);
|
||||
checkModule("HTTP::Headers",1.61);
|
||||
checkModule("Test::More",0.61);
|
||||
checkModule("Test::More",0.61,1);
|
||||
checkModule("Pod::Coverage",0.17,1);
|
||||
checkModule("Digest::MD5",2.20);
|
||||
checkModule("DBI",1.40);
|
||||
checkModule("DBD::mysql",2.1021);
|
||||
|
|
@ -72,7 +73,7 @@ checkModule("Parse::PlainConfig",1.1);
|
|||
checkModule("XML::RSSLite",0.11);
|
||||
checkModule("POE",0.3202);
|
||||
checkModule("POE::Component::IKC::Server",0.18);
|
||||
checkModule("Apache2::Request");
|
||||
checkModule("Apache2::Request",2.06);
|
||||
|
||||
###################################
|
||||
# Checking WebGUI
|
||||
|
|
|
|||
66
t/POD.t
Normal file
66
t/POD.t
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2005 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
# this software.
|
||||
#-------------------------------------------------------------------
|
||||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
# ---- BEGIN DO NOT EDIT ----
|
||||
use strict;
|
||||
use lib '../lib';
|
||||
use Getopt::Long;
|
||||
use Pod::Coverage;
|
||||
use File::Find;
|
||||
use WebGUI::Session;
|
||||
# ---- END DO NOT EDIT ----
|
||||
|
||||
|
||||
use Test::More;
|
||||
|
||||
initialize(); # this line is required
|
||||
|
||||
my $moduleCount = 0;
|
||||
find(\&countModules, "../lib/WebGUI");
|
||||
diag("Planning on running $moduleCount tests\n");
|
||||
plan tests => $moduleCount;
|
||||
find(\&checkPod, "../lib/WebGUI");
|
||||
|
||||
cleanup(); # this line is required
|
||||
|
||||
sub countModules {
|
||||
my $filename = $_;
|
||||
return unless $filename =~ m/\.pm$/;
|
||||
$moduleCount++;
|
||||
}
|
||||
|
||||
sub checkPod {
|
||||
my $filename = $File::Find::dir."/".$_;
|
||||
return unless $filename =~ m/\.pm$/;
|
||||
my $package = $filename;
|
||||
$package =~ s/^\.\.\/lib\/(.*)\.pm$/$1/;
|
||||
$package =~ s/\//::/g;
|
||||
my $pc = Pod::Coverage->new(package=>$package);
|
||||
print $package.":".$pc->coverage.$pc->why_unrated."\n";
|
||||
#ok($pc->coverage, $package);
|
||||
}
|
||||
|
||||
|
||||
# ---- DO NOT EDIT BELOW THIS LINE -----
|
||||
|
||||
sub initialize {
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
WebGUI::Session::open("..",$configFile);
|
||||
}
|
||||
|
||||
sub cleanup {
|
||||
WebGUI::Session::close();
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue