Commits

Shlomi Fish committed a134cb3

Convert t/09exslt.t to Test::More.

Comments (0)

Files changed (2)

         - t/06entities.t
         - t/07blankdoc.t
         - t/08literal.t
+        - t/09exslt.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;
-use constant PLAN => 6;
-BEGIN { plan tests => PLAN; }
+use strict;
+use warnings;
+
+use Test::More;
 
 use XML::LibXSLT;
 use XML::LibXML;
 
-unless (XML::LibXSLT::HAVE_EXSLT()) {
-  skip("this test requires XML::LibXSLT to be compiled with libexslt\n") for (1..PLAN);	
-  exit;
+if (not XML::LibXSLT::HAVE_EXSLT()) {
+    plan skip_all => "this test requires XML::LibXSLT to be compiled with libexslt"
+}
+else {
+    # Should be 6.
+    plan tests => 6;
 }
 
 my $parser = XML::LibXML->new();
-ok($parser);
+# TEST
+ok($parser, '$parser was initted.');
 
 my $doc = $parser->parse_string(<<'EOT');
 <?xml version="1.0"?>
 </doc>
 EOT
 
-ok($doc);
+# TEST
+ok($doc, '$doc is true.');
 
 my $xslt = XML::LibXSLT->new();
 my $style_doc = $parser->parse_string(<<'EOT');
 </xsl:stylesheet>
 EOT
 
-ok($style_doc);
+# TEST
+
+ok($style_doc, '$style_doc is true.');
 
 # warn "Style_doc = \n", $style_doc->toString, "\n";
 
 my $stylesheet = $xslt->parse_stylesheet($style_doc);
 
-ok($stylesheet);
+# TEST
+ok($stylesheet, '$stylesheet is true.');
 
 my $results = $stylesheet->transform($doc);
 
-ok($results);
+# TEST
+ok($results, '$results is true.');
 
 my $output = $stylesheet->output_string($results);
 
-ok($output);
+# TEST
+ok($output, '$output is true.');
 
 # warn "Results:\n", $output, "\n";