Commits

Shlomi Fish committed d68d455

Convert t/07blankdoc.t to Test::More.

Comments (0)

Files changed (2)

         - t/05quick.t
         - t/06output.t
         - t/06entities.t
+        - t/07blankdoc.t
 
 1.73            Sun Oct  9 17:32:30 IST 2011
     - Possible fix for https://rt.cpan.org/Ticket/Display.html?id=71456 :
-use Test;
-BEGIN { plan tests => 5 }
+use strict;
+use warnings;
+
+# Should be 5.
+use Test::More tests => 5;
 use XML::LibXSLT;
 
 my $parser = XML::LibXML->new();
 my $xslt = XML::LibXSLT->new();
-ok($parser); ok($xslt);
+
+# TEST
+ok($parser, 'parser was initted.');
+# TEST
+ok($xslt, 'xslt object was initted.');
 
 local $XML::LibXML::match_cb = \&match_cb;
 local $XML::LibXML::open_cb = \&open_cb;
 
 my $style = $parser->parse_string($foodoc,'foo');
 
-ok($style);
+# TEST
+ok($style, '$style is true');
+
 my $stylesheet = $xslt->parse_stylesheet($style);
 # my $stylesheet = $xslt->parse_stylesheet_file("example/document.xsl");
 
 my $results = $stylesheet->transform($source);
-ok($results);
-
-ok($results->toString, qr/typed data in stylesheet/);
+# TEST
+ok ($results, 'Results are true.');
+# TEST
+like ($results->toString, qr/typed data in stylesheet/, 
+    'found "typed data in stylesheet"');
 
 ###############################################################
 # Callbacks - this is needed because with document('') now,