use strict;
unless (-d "base") {
chdir "t" or die "Can't chdir: $!";
foreach (@INC) {
$_ = "../$_" unless m,^([a-z]:)?[/\\],i;
}
}
unshift(@INC, "../blib/lib", "../blib/arch");
use Test::Harness;
$Test::Harness::verbose = shift
if defined $ARGV[0] and $ARGV[0] =~ /^\d+$/ || $ARGV[0] eq "-v";
my @tests;
if (@ARGV) {
for (@ARGV) {
if (-d $_) {
push(@tests, <$_/*.t>);
} else {
$_ .= ".t" unless /\.t$/;
push(@tests, $_);
}
}
} else {
@tests = (<base/*.t>, <html/*.t>, <robot/*.t>, <local/*.t>);
push(@tests, <live/*.t>) if -f "live/ENABLED";
push(@tests, <net/*.t>) if -f "net/config.pl";
}
runtests @tests;