2
###########################################################################
4
## Test::Harness is a testing wrapper that will process output
5
## from Test.pm module tests. Sumarize results, report stats
6
## and exit with overall status for the testing suites.
12
## Run Individual tests
14
###########################################################################
16
##----------------------------##
17
##---] CORE/CPAN INCLUDES [---##
18
##----------------------------##
25
##-------------------##
27
##-------------------##
28
our $VERSION = qw(1.0);
31
##-------------------##
33
##-------------------##
39
unless(GetOptions(\%argv,
44
print " --debug Enable debug mode\n";
48
if (2 > $Test::Harness::VERSION)
50
print "Unit tests will not be run, Test::Harness is too old\n"
58
########################################
59
## Gather a list of tests if none passed
60
########################################
61
unless (@tests = @ARGV)
65
while($_ = readdir(D)) {
73
###############################################
74
## Glob a list of tests when directories passed
75
###############################################
80
if (-d $_ && (my $dir = $_))
82
opendir(D, $_) || die "opendir(D) failed: $!";
83
my @tests = grep(/\.t[^\.\s]+/o, readdir(D));
85
push(@tmp, map{ join('/', $dir, $_); } @tests);
92
print "$0: @ARGV\n" if ($argv{debug});