5 use warnings FATAL => 'all';
6 use Capture::Tiny qw(capture);
8 use File::Which qw(which);
11 # Skip means sweep bugs under the rug.
12 # I want this test to be actually run.
13 BAIL_OUT 'xmllint (part of the libxml2 package) not installed.'
14 unless which 'xmllint';
18 my $runtime_params_file = '_build/runtime_params';
19 my $runtime_params = do $runtime_params_file;
20 die "Could not load $runtime_params_file. Run Build.PL first.\n"
21 unless $runtime_params;
22 $destdir = $runtime_params->{destdir};
25 my $iter = File::Next::files({
26 file_filter => sub {/\.html \z/msx},
33 while (defined(my $html_file = $iter->())) {
35 my (undef, $stderr) = capture {
36 system qw(xmllint --noout), $html_file;
38 ok !$stderr, "$html_file validates";
39 diag $stderr if $stderr;
42 done_testing($file_counter);