Commits

ma...@9ae0c189-cd1f-4510-a509-f4891f5cf20d  committed e9c4702

More dtd validation stuff

  • Participants
  • Parent commits 119a2a8

Comments (0)

Files changed (1)

 use Test;
-BEGIN { plan tests => 9 }
+BEGIN { plan tests => 11 }
 use XML::LibXML;
 ok(1);
 
 my $xml = XML::LibXML->new->parse_file('example/article.xml');
 ok($xml);
 ok($xml->is_valid($dtd));
+ok($xml->validate($dtd));
 }
 
 {
 ok($dtd);
 my $xml = XML::LibXML->new->parse_file('example/article_bad.xml');
 ok(!$xml->is_valid($dtd));
+eval {
+    $xml->validate($dtd);
+    ok(0); # shouldn't get here
+};
+ok($@);
 }