Commits

Tim Brody  committed 9189140 Draft

Unit test to demonstrate failing parse_fh with external entities

Occurs on RHEL 6 libxml 2.7.6

  • Participants
  • Parent commits dc5a447

Comments (0)

Files changed (1)

 use strict;
 use warnings;
 
-use Test::More tests => 531;
+use Test::More tests => 532;
 use IO::File;
 
 use XML::LibXML::Common qw(:libxml);
         # second time it must not fail.
         my $doc2   = $parser->parse_string( $xmldoc );
         is( $doc2->documentElement()->string_value(), " test " );
+
+        # parse_fh should also work
+        open(my $fh, "<", \$xmldoc);
+        my $doc3   = $parser->parse_fh( $fh );
+        is( $doc2->documentElement()->string_value(), " test " );
 }
 
 ##