# $Id$
use Test::More;
use WebService::Validator::HTML::W3C;
my $test_num = 5;
if ( $ENV{ 'TEST_AUTHOR' } ) {
$test_num = 6;
}
plan tests => $test_num;
my $v = WebService::Validator::HTML::W3C->new(
http_timeout => 10,
detailed => 1,
);
SKIP: {
skip "XML::XPath not installed", $test_num if -f 't/SKIPXPATH';
ok($v, 'object created');
if ( $ENV{ 'TEST_AUTHOR' } ) {
my $r = $v->validate('http://exo.org.uk/code/www-w3c-validator/invalid.html');
unless ($r) {
if ($v->validator_error eq "Could not contact validator")
{
skip "failed to contact validator", 5;
}
}
ok ($r, 'page validated');
} else {
$v->num_errors( 1 );
$v->_content( qq{
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".