App-FuguWeb
view release on metacpan or search on metacpan
lib/App/FuguWeb/Check.pm view on Meta::CPAN
next unless -f $self->{out} . "/$page";
push @problems, $self->_check_page($page);
}
push @problems, $self->_check_reachable;
return @problems;
}
# $self->_check_inventory:
# Every page and asset exists and is not empty, and the output
# holds nothing else: no staging directory, no editor backup, no
# stray source.
sub _check_inventory ($self)
{
my @problems;
unless ( -d $self->{out} ) {
return "$self->{out}: the site is not built";
}
my @expected = $self->{config}->inventory;
lib/App/FuguWeb/Check.pod view on Meta::CPAN
C<./>;
=item *
every page is reachable from the entry page, except a page that the
description marks C<unlinked>;
=item *
the output holds the site and nothing else: no staging directory, no
editor backup, no stray source.
=back
=head2 external
The external links that the last C<run> collected, sorted.
=head1 SEE ALSO
L<App::FuguWeb>, L<App::FuguWeb::Config>, L<App::FuguWeb::Site>,
t/fuguweb/check.t view on Meta::CPAN
my $joined = join "\n", @problems;
is( scalar @problems, 0, 'no problem' ) or diag $joined;
unlike( $joined, qr/mailto/,
'a mailto: link is not a dead local link' );
unlike( $joined, qr/man\.openbsd\.org/,
'a cross-reference that left for the host does not dangle' );
};
subtest 'a stray file in the output' => sub {
my @problems = built( 'index.html~' => "an editor backup\n" )->run;
like( join( "\n", @problems ),
qr{index\.html~: in the output but not in the site},
'the stray file is named' );
};
done_testing();
( run in 0.980 second using v1.01-cache-2.11-cpan-4ef0a570458 )