webgui/t/POD.t
Colin Kuskie 9c1c0fa576 Output PODs in sorted order
1 test was undeclared in Utility.t
2005-12-25 00:09:20 +00:00

65 lines
1.6 KiB
Perl

#-------------------------------------------------------------------
# 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 @modules = ();
find(\&countModules, "../lib/WebGUI");
my $moduleCount = scalar(@modules);
diag("Planning on running $moduleCount tests\n");
plan tests => $moduleCount;
foreach my $package (sort @modules) {
my $pc = Pod::Coverage->new(package=>$package);
ok($pc->coverage, $package);
}
cleanup(); # this line is required
sub countModules {
my $filename = $File::Find::dir."/".$_;
return unless $filename =~ m/\.pm$/;
return if $filename =~ m/WebGUI\/i18n/;
return if $filename =~ m/WebGUI\/Help/;
my $package = $filename;
$package =~ s/^\.\.\/lib\/(.*)\.pm$/$1/;
$package =~ s/\//::/g;
push(@modules,$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();
}