Commits

Shlomi Fish  committed d8691b6

Convert t/06entities.t to Test::More.

  • Participants
  • Parent commits 3c3680d

Comments (0)

Files changed (2)

         - t/04params.t
         - t/05quick.t
         - t/06output.t
+        - t/06entities.t
 
 1.73            Sun Oct  9 17:32:30 IST 2011
     - Possible fix for https://rt.cpan.org/Ticket/Display.html?id=71456 :

File t/06entities.t

-use Test;
-BEGIN { plan tests => 2 }
+use strict;
+use warnings;
+
+use Test::More tests => 2;
 
 use XML::LibXML;
 use XML::LibXSLT;
-for my $p (qw(
-  XML::LibXML::VERSION
-  XML::LibXSLT::VERSION
- )) {
-  printf "%s: %s\n", $p, $$p;
-}
-use strict;
 
 my $parser = XML::LibXML->new();
 my $xslt = XML::LibXSLT->new();
 </xsl:stylesheet>
 ');
 
-print $style_doc->toString;
 
 my $stylesheet = $xslt->parse_stylesheet($style_doc);
 
 my $results = $stylesheet->transform($source);
 
 my $tostring = $results->toString;
-print $tostring;
 
-ok($tostring, qr/foo(?:.|&#xF6;)bar/i);
+# TEST
+like ($tostring, qr/foo(?:.|&#xF6;)bar/i, '$tostring matches entity.');
 
 my $content = $stylesheet->output_string($results);
 
-print $content, "\n";
-
 # libxml2-2.6.16/libxslt-1.1.9 will produce a character entity
 # latest versions give a UTF-8 encoded character
 
-ok($content, qr/foo(?:&#xF6;|\xC3\xB6)bar/i);
+# TEST
+like ($content, qr/foo(?:&#xF6;|\xC3\xB6)bar/i, '$content matches entity.');
+