Apache2-AutoIndex-XSLT
view release on metacpan or search on metacpan
t/tests/40validxml.t view on Meta::CPAN
use Apache::TestUtil;
use Apache::TestRequest 'GET_BODY';
plan tests => 1, have_module qw(XML::Validate);
my $validator;
if (eval { $validator = new XML::Validate(Type => 'BestAvailable'); }) {
my $url = '/test/';
my $data = GET_BODY $url;
my $error = '';
unless ($validator->validate($data)) {
my $message = $validator->last_error()->{message} || '';
my $line = $validator->last_error()->{line} || '';
my $column = $validator->last_error()->{column} || '';
$error = "Error: $message at line $line, column $column";
}
ok t_cmp($error, '', 'no xml validation errors');
} else {
skip "Incomplete XML::Validate installation";
}
( run in 0.262 second using v1.01-cache-2.11-cpan-a5abf4f5562 )