Permalink
Browse files

[t/hitomi/01-xml-parsing.t] added more tests

The last one fails. Don't know why yet.
  • Loading branch information...
1 parent c9298b0 commit 56156ff72bc3c083edb67bbe0b3267a068f0ee0c @masak committed May 20, 2009
Showing with 10 additions and 6 deletions.
  1. +10 −6 t/hitomi/01-xml-parsing.t
@@ -3,17 +3,21 @@ use v6;
use Test;
use Hitomi;
-my @correct-xml =
+my @valid-xml =
'<a/>',
'<html />',
'<html></html>',
;
-my @incorrect-xml =
- ''
+my @invalid-xml =
+ '',
+ '<',
+ '<a',
+ '<a>',
+ '<a><b></a></b>',
;
-plan @correct-xml + @incorrect-xml;
+plan @valid-xml + @invalid-xml;
-ok Hitomi::XML.parse($_) for @correct-xml;
-nok Hitomi::XML.parse($_) for @incorrect-xml;
+ok Hitomi::XML.parse($_), "$_ is valid" for @valid-xml;
+nok Hitomi::XML.parse($_), "$_ is invalid" for @invalid-xml;

0 comments on commit 56156ff

Please sign in to comment.