unittests.pl.svn-base
上传用户:market2
上传日期:2018-11-18
资源大小:18786k
文件大小:1k
- #!/usr/bin/env perl
- use strict;
- no strict 'refs';
- use FindBin qw($RealBin);
- use lib "$RealBin";
- use lib "$RealBin/..";
- use lib "$RealBin/../deps";
- use Test::More qw(no_plan);
- my @tests = qw(CallbackListTest ObjectListTest ActorListTest WhirlpoolTest
- SetTest SkillTest InventoryListTest
- TaskManagerTest TaskWithSubtaskTest TaskChainedTest
- PluginsHookTest);
- if ($^O eq 'MSWin32') {
- push @tests, qw(HttpReaderTest);
- }
- @tests = @ARGV if (@ARGV);
- foreach my $module (@tests) {
- $module =~ s/.pm$//;
- eval {
- require "${module}.pm";
- };
- if ($@) {
- $@ =~ s/(@INC contains: .*?) //s;
- print STDERR "Cannot load unit test $module:n$@n";
- exit 1;
- }
- my $start = "${module}::start";
- $start->();
- }