| 1 | use strict; | ||
| 2 | use lib qw( lib t/tlib ); | ||
| 3 | use Test::Unit::TestRunner; | ||
| 4 | |||
| 5 | my @tests; | ||
| 6 | |||
| 7 | if (@ARGV) | ||
| 8 | { | ||
| 9 | @tests = @ARGV; | ||
| 10 | } | ||
| 11 | else | ||
| 12 | { | ||
| 13 | @tests = ('PerlActor::test::AllTests'); | ||
| 14 | } | ||
| 15 | |||
| 16 | print "\nRunning Tests\n"; | ||
| 17 | print "==============\n"; | ||
| 18 | my $testrunner = Test::Unit::TestRunner->new(); | ||
| 19 | |||
| 20 | while (my $test = shift @tests) | ||
| 21 | { | ||
| 22 | # Turn possible path into package name | ||
| 23 | #$test =~ s/^.*test\///; | ||
| 24 | $test =~ s/\.pm$//g; | ||
| 25 | $test =~ s/\//::/g; | ||
| 26 | |||
| 27 | $testrunner->start($test); | ||
| 28 | } |