Skip to content

Commit

Permalink
handle set_document_locator event (lestrrat-p5#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
eserte committed Mar 30, 2018
1 parent 7259719 commit a9423bb
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions t/01_basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@ use strict;
our $AUTOLOAD;
use Data::Dumper;
use Test::More;
use XML::LibXML;

my @EVENTS = (
($XML::LibXML::VERSION >= 2.0129 ?
{
Event => 'set_document_locator'
}
: ()),
{
Event => 'start_document'
},
Expand Down Expand Up @@ -108,9 +114,11 @@ sub AUTOLOAD {

package main;
use strict;
use Test::More( tests => 23 );
use Test::More;
use XML::SAX;

plan tests => $XML::LibXML::VERSION >= 2.0129 ? 25 : 23;

XML::SAX->add_parser( q{XML::LibXML::SAX::ChunkParser} );

{
Expand Down Expand Up @@ -140,4 +148,4 @@ XML::SAX->add_parser( q{XML::LibXML::SAX::ChunkParser} );
diag("parsing chunk '$chunk'");
$parser->parse_chunk($chunk);
}
}
}

0 comments on commit a9423bb

Please sign in to comment.