Skip to content
Browse files

[t/hitomi/01-xml-parsing.t] made file run

I'm pretty sure it's never ever been in a runnable condition prior
to this. Wonder why.
  • Loading branch information...
1 parent fa17375 commit 04cf10bc890711ebae84000cb28824ed10896640 @masak committed Nov 29, 2010
Showing with 14 additions and 2 deletions.
  1. +3 −0 lib/Hitomi.pm
  2. +11 −2 t/hitomi/01-xml-parsing.t
View
3 lib/Hitomi.pm
@@ -0,0 +1,3 @@
+use v6;
+
+use Hitomi::XMLParser;
View
13 t/hitomi/01-xml-parsing.t
@@ -17,7 +17,16 @@ my @invalid-xml =
'<a><b></a></b>',
;
+sub parse($text) {
+ my $succeeded = False;
+ try {
+ Hitomi::XMLParser.new($text).llist();
+ $succeeded = True;
+ }
+ $succeeded;
+}
+
plan @valid-xml + @invalid-xml;
-ok Hitomi::XML.parse($_), "$_ is valid" for @valid-xml;
-nok Hitomi::XML.parse($_), "$_ is invalid" for @invalid-xml;
+ok parse($_), "$_ is valid" for @valid-xml;
+nok parse($_), "$_ is invalid" for @invalid-xml;

0 comments on commit 04cf10b

Please sign in to comment.
Something went wrong with that request. Please try again.