Commits

Shlomi Fish  committed f439b71

Convert more to Test::XML::Ordered.

  • Participants
  • Parent commits f012cde

Comments (0)

Files changed (4)

File perl/modules/XML-Grammar-Fiction/t/lib/XmlGrammarTestXML.pm

 
 our @EXPORT_OK = (qw(my_is_xml));
 
-use Test::XML::Ordered '0.0.4';
+use Test::XML::Ordered '0.0.5';
 use Test::XML::Ordered qw(is_xml_ordered);
 
 my @is_xml_common = (validation => 0, load_ext_dtd => 0, no_network => 1);

File perl/modules/XML-Grammar-Fiction/t/screenplay/data/xml/with-comments.xml

             <para>
                 I will kill you.
             </para>
+            <!-- David and Goliath are Biblical characters -->
         </saying>
-        <!-- David and Goliath are Biblical characters -->
         <saying character="Goliath">
             <para>
                 no way, you little idiot!

File perl/modules/XML-Grammar-Fiction/t/screenplay/data/xml/with-multi-line-comments.xml

             <para>
                 I will kill you.
             </para>
-        </saying>
         <!-- David and Goliath are Biblical characters
 
         They are nifty.
         -->
+        </saying>
         <saying character="Goliath">
             <para>
                 no way, you little idiot!

File perl/modules/XML-Grammar-Fiction/t/screenplay/proto-text-to-xml-using-custom-parser.t

 use strict;
 use warnings;
 
-use Test::More;
+use lib './t/lib';
 
-use Test::XML tests => 54;
+use Test::More tests => 54;
+
+use XmlGrammarTestXML qw(my_is_xml);
 
 use XML::LibXML;
 
 {
     my $path = shift;
 
-    open my $in, "<", $path;
+    open my $in, "<:encoding(utf8)", $path;
     my $contents;
     {
         local $/;
     unlike ($got_xml, qr{^<!DOCTYPE}ms, "No doctype in \"$fn\"");
 
     # TEST*$num_texts
-    is_xml ($got_xml, load_xml("t/screenplay/data/xml/$fn.xml"),
+    my_is_xml (
+        [ string => $got_xml, ],
+        [ string => load_xml("t/screenplay/data/xml/$fn.xml"), ],
         "Output of the Proto Text \"$fn\""
     );