run-test.pl untested

filter: Statementstmt 0.0% 0 / 19 Branchbran 0.0% 0 / 8 Conditioncond 0.0% 0 / 10 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 41 CC 4 SCAR 26.4
CC
4
Cov
0%
wanted
20.0
BEGIN
2.0
BEGIN
2.0
CRAP 14.0
1 #! /usr/bin/env perl
2  
3 use File::Find;
4 use Cwd;
5  
6 my $root = getcwd();
7  
8 if ($^O =~ 'MSWin'){
9 find( { wanted => \&wanted, no_chdir => 1 } , 'examples/');
10 } else {
11 my $cmd = "cd examples && strun --recurse --purge-cache --format default";
12 (system($cmd) == 0) or die "$cmd failed";
13 }
14  
15 sub wanted {
16  
17 return unless /story\.(pl|rb|bash|py|pm)$/ or /meta\.txt$/;
18  
19 return if /modules\//;
20  
21 return unless ( -e $File::Find::dir."\\windows.test" or $File::Find::dir =~/windows/ );
22  
23 (my $dir = $File::Find::dir)=~s{examples/}{};
24
25 my $cmd = "cd examples && strun --purge-cache --story $dir --format production";
26  
27 (system($cmd) == 0) or die "$cmd failed";
28  
29 }
30  
31