5 use warnings FATAL => 'all';
6 use Capture::Tiny qw(capture);
8 use File::Which qw(which);
9 use Module::Build qw();
12 # Skip means sweep bugs under the rug.
13 # I want this test to be actually run.
14 BAIL_OUT 'xmllint (part of the libxml2 package) not installed.'
15 unless which 'xmllint';
18 eval { $build = Module::Build->current; 1; }
19 or BAIL_OUT 'We are not in a Module::Build session. Run Build.PL first.';
21 my $iter = File::Next::files({
22 file_filter => sub {/\.html \z/msx},
29 while (defined(my $html_file = $iter->())) {
31 my (undef, $stderr) = capture {
32 system qw(xmllint --noout), $html_file;
34 ok !$stderr, "$html_file validates";
35 diag $stderr if $stderr;
38 done_testing($file_counter);