# $Id: 03invalid.t 697 2007-08-05 20:22:35Z struan $ use Test::More tests => 3; use WebService::Validator::HTML::W3C; use HTTP::Response; my $v = WebService::Validator::HTML::W3C->new( ); 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", 2; } } } else { my $resp = HTTP::Response->parse( <_response( $resp ); $v->_parse_validator_response(); } ok (!$v->is_valid, 'page is not valid'); is ($v->num_errors, 4, 'correct number of errors');