Created
December 14, 2011 19:13
-
-
Save colomon/1478008 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my %tests; | |
for @*ARGS -> $file { | |
say "Scanning $file"; | |
my $fh = open $file or die "Unable to open $file"; | |
for $fh.lines { | |
when /plan \s+ (\d+)/ { %tests{$file} = +$0; last; } | |
} | |
} | |
my %tests-run; | |
my $fh = open "t/spectest.data" or die "Unable to open t/spectest.data"; | |
for $fh.lines { | |
when /^'#'/ { } | |
%tests-run{"t/spec/$_"} = 1; | |
} | |
$fh.close; | |
say %tests.pairs.perl; | |
say "Results: "; | |
for %tests.pairs.sort({ $^a.value <=> $^b.value }) -> $kv { | |
my $file = $kv.key; | |
my $test-count = $kv.value; | |
if %tests-run{$file} { | |
# say "$file has $test-count tests"; | |
} else { | |
say "$file has $test-count tests"; | |
# say "$file has $test-count tests and is NOT BEING RUN"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment