Skip to content

Commit

Permalink
Die on pod warnings also.
Browse files Browse the repository at this point in the history
Helps catch errors like C<asdf

Fix comment;
  • Loading branch information
coke committed Sep 9, 2017
1 parent 4a6382c commit 1a74aea
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions t/pod-valid.t
Expand Up @@ -4,7 +4,7 @@ use lib 'lib';

=begin overview
Insure any text that isn't a code example has a space after each comma.
Insure any text that isn't a code example has valid POD6
=end overview

Expand All @@ -22,15 +22,18 @@ if @*ARGS {

plan +@files;

my %data;

sub test-it($job) {
ok !$job.exitcode, "{$job.command[*-1]} has valid Pod6"
my $file = $job.command[*-1];
ok !$job.exitcode && !%data{$file}, "$file has clean POD6"
}

my @jobs;
for @files -> $file {
my $p = Proc::Async.new($*EXECUTABLE-NAME, '--doc', $file);
$p.stdout.tap(-> $buf {});
$p.stderr.tap(-> $buf {});
$p.stderr.tap(-> $buf { %data{$file} = 1 });
push @jobs: $p.start;
if +@jobs > $max-jobs {
test-it(await @jobs.shift);
Expand Down

0 comments on commit 1a74aea

Please sign in to comment.