forked from pjcj/Devel--Cover
/
create_gold
executable file
·44 lines (31 loc) · 887 Bytes
/
create_gold
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/perl
# Copyright 2002-2004, Paul Johnson (pjcj@cpan.org)
# This software is free. It is licensed under the same terms as Perl itself.
# The latest version of this software should be available from my homepage:
# http://www.pjcj.net
require 5.6.1;
use strict;
use warnings;
our $VERSION = "0.44";
use blib;
use Devel::Cover::Test 0.44;
my @tests = @ARGV;
mkdir "test_output" unless -d "test_output";
mkdir "test_output/cover" unless -d "test_output/cover";
unless (@tests)
{
opendir D, "tests" or die "Cannot opendir tests: $!";
for my $t (readdir D)
{
next unless -f "tests/$t";
next if $t =~ /\.(t|pm|pl|version|org|bak)$/;
next if $t =~ /~$/;
push @tests, $t;
}
closedir D or die "Cannot closedir tests: $!";
}
for my $test (@tests)
{
my $t = Devel::Cover::Test->new($test);
$t->create_gold;
}