Subject: | CSSValidator reports !valid for obviously valid documents |
The test script below checking for search.cpan.org's main page reports
an invalid document. But the detailed report does not show any errors.
#!/usr/bin/perl -w
use Test::More 'no_plan';
use Data::Dumper;
use W3C::LogValidator::CSSValidator;
#my $rooturl = "http://www.example.com";
my $rooturl = "http://search.cpan.org/";
my $validator = W3C::LogValidator::CSSValidator->new
({verbose => 1,
rooturl => $rooturl,
AuthorizedExtensions => ".html .xhtml .phtml .htm .shtml .php .svg
.xml / .cgi",
});
$validator->uris($rooturl);
my %results = $validator->process_list;
ok($validator->valid, "CSS validation")
or diag Dumper(\%results);
__END__
Output is:
perl /tmp/a.pl
Now Using the CSS Validation module...
Done!
not ok 1 - CSS validation
# Failed test 'CSS validation'
# at /tmp/a.pl line 17.
# $VAR1 = {
# 'thead' => [
# 'Rank',
# 'Hits',
# '#Error(s)',
# 'Address'
# ],
# 'trows' => [],
# 'intro' => 'Here are the most popular invalid document(s)
that I could find in the
# logs for .',
# 'name' => 'CSSValidator',
# 'outro' => 'I couldn\'t find any invalid document in this log.'
# };
1..1
# Looks like you failed 1 test of 1.