r31257 - in /trunk/libxml-sax-perl: META.yml SAX.pm XML-SAX-Base/Makefile.PL t/00basic.t t/14encoding.t t/42entities.t

antonio-guest at users.alioth.debian.org antonio-guest at users.alioth.debian.org
Sun Mar 1 00:45:40 UTC 2009


Author: antonio-guest
Date: Sun Mar  1 00:45:37 2009
New Revision: 31257

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=31257
Log:
commit for the upgrade

Modified:
    trunk/libxml-sax-perl/META.yml
    trunk/libxml-sax-perl/SAX.pm
    trunk/libxml-sax-perl/XML-SAX-Base/Makefile.PL
    trunk/libxml-sax-perl/t/00basic.t
    trunk/libxml-sax-perl/t/14encoding.t
    trunk/libxml-sax-perl/t/42entities.t

Modified: trunk/libxml-sax-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-sax-perl/META.yml?rev=31257&op=diff
==============================================================================
--- trunk/libxml-sax-perl/META.yml (original)
+++ trunk/libxml-sax-perl/META.yml Sun Mar  1 00:45:37 2009
@@ -1,7 +1,7 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         XML-SAX
-version:      0.16
+version:      0.96
 version_from: SAX.pm
 installdirs:  site
 requires:
@@ -9,4 +9,4 @@
     XML::NamespaceSupport:         0.03
 
 distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+generated_by: ExtUtils::MakeMaker version 6.30_01

Modified: trunk/libxml-sax-perl/SAX.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-sax-perl/SAX.pm?rev=31257&op=diff
==============================================================================
--- trunk/libxml-sax-perl/SAX.pm (original)
+++ trunk/libxml-sax-perl/SAX.pm Sun Mar  1 00:45:37 2009
@@ -1,11 +1,19 @@
+<<<<<<< .working
 # $Id: SAX.pm,v 1.29 2007/06/27 09:09:12 grant Exp $
+=======
+# $Id: SAX.pm,v 1.31 2008-08-05 12:36:24 grant Exp $
+>>>>>>> .merge-right.r31256
 
 package XML::SAX;
 
 use strict;
 use vars qw($VERSION @ISA @EXPORT_OK);
 
+<<<<<<< .working
 $VERSION = '0.16';
+=======
+$VERSION = '0.96';
+>>>>>>> .merge-right.r31256
 
 use Exporter ();
 @ISA = ('Exporter');

Modified: trunk/libxml-sax-perl/XML-SAX-Base/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-sax-perl/XML-SAX-Base/Makefile.PL?rev=31257&op=diff
==============================================================================
--- trunk/libxml-sax-perl/XML-SAX-Base/Makefile.PL (original)
+++ trunk/libxml-sax-perl/XML-SAX-Base/Makefile.PL Sun Mar  1 00:45:37 2009
@@ -1,4 +1,4 @@
-# $Id: Makefile.PL,v 1.15 2007/02/07 09:33:50 grant Exp $
+# $Id: Makefile.PL,v 1.15 2007-02-07 09:33:50 grant Exp $
 
 use strict;
 

Modified: trunk/libxml-sax-perl/t/00basic.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-sax-perl/t/00basic.t?rev=31257&op=diff
==============================================================================
--- trunk/libxml-sax-perl/t/00basic.t (original)
+++ trunk/libxml-sax-perl/t/00basic.t Sun Mar  1 00:45:37 2009
@@ -1,6 +1,11 @@
 use Test;
-BEGIN { plan tests => 1 }
-END { ok($loaded) }
+BEGIN { plan tests => 2 }
+END { ok($loaded == 2) }
 use XML::SAX;
 $loaded++;
 
+use XML::SAX::PurePerl;
+$loaded++;
+
+ok(XML::SAX->VERSION eq XML::SAX::PurePerl->VERSION);
+

Modified: trunk/libxml-sax-perl/t/14encoding.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-sax-perl/t/14encoding.t?rev=31257&op=diff
==============================================================================
--- trunk/libxml-sax-perl/t/14encoding.t (original)
+++ trunk/libxml-sax-perl/t/14encoding.t Sun Mar  1 00:45:37 2009
@@ -1,23 +1,25 @@
 use Test;
 BEGIN { $tests = 0;
-    if ($] >= 5.007002) { $tests = 7 }
+    if ($] >= 5.007002) { $tests = 9 }
     plan tests => $tests;
 }
 if ($tests) {
 use XML::SAX::PurePerl;
-use XML::SAX::PurePerl::DebugHandler;
 
-my $handler = XML::SAX::PurePerl::DebugHandler->new();
+my $handler = TestHandler->new(); # see below for the TestHandler class
 ok($handler);
 
 my $parser = XML::SAX::PurePerl->new(Handler => $handler);
 ok($parser);
 
 # warn("utf-16\n");
+# verify that the first element is correctly decoded
+$handler->{test_elements} = [ "\x{9031}\x{5831}" ];
 $parser->parse_uri("testfiles/utf-16.xml");
 ok(1);
 
 # warn("utf-16le\n");
+$handler->{test_elements} = [ "foo" ];
 $parser->parse_uri("testfiles/utf-16le.xml");
 ok(1);
 
@@ -33,3 +35,19 @@
 $parser->parse_uri("testfiles/iso8859_2.xml");
 ok(1);
 }
+
+package TestHandler;
+use XML::SAX::PurePerl::DebugHandler;
+use base qw(XML::SAX::PurePerl::DebugHandler);
+use Test;
+
+sub start_element {
+    my $self = shift;
+    if ($self->{test_elements} and
+        my $value = pop @{$self->{test_elements}}) {
+        ok($_[0]->{Name}, $value);
+    }
+    $self->SUPER::start_element(@_);
+}
+
+1;

Modified: trunk/libxml-sax-perl/t/42entities.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-sax-perl/t/42entities.t?rev=31257&op=diff
==============================================================================
--- trunk/libxml-sax-perl/t/42entities.t (original)
+++ trunk/libxml-sax-perl/t/42entities.t Sun Mar  1 00:45:37 2009
@@ -1,3 +1,5 @@
+<<<<<<< .working
+<<<<<<< .working
 use strict;
 use warnings;
 
@@ -35,3 +37,81 @@
         $self->{_buf} .= "$attr->{$_}->{LocalName}=$attr->{$_}->{Value} ";
     }
 }
+=======
+use strict;
+use warnings;
+
+use Test;
+BEGIN { plan tests => 4 }
+
+use XML::SAX::PurePerl;
+
+my $handler = AttrHandler->new();
+ok($handler);
+
+my $parser = XML::SAX::PurePerl->new(Handler => $handler);
+ok($parser);
+
+$parser->parse_string('<code amp="&amp;" x3E="&#x3E;" num="&#65;" />');
+ok(1); # parser didn't die
+
+my $expected = "amp=& num=A x3E=> ";
+ok($handler->attributes, $expected);
+
+exit;
+
+
+package AttrHandler;
+
+use base 'XML::SAX::Base';
+
+sub start_document { shift->{_buf} = '';             }
+sub attributes     { shift->{_buf};                  }
+
+sub start_element {
+    my($self, $data) = @_;
+    my $attr = $data->{Attributes};
+    foreach (sort keys %$attr) {
+        $self->{_buf} .= "$attr->{$_}->{LocalName}=$attr->{$_}->{Value} ";
+    }
+}
+>>>>>>> .merge-right.r31255
+=======
+use strict;
+use warnings;
+
+use Test;
+BEGIN { plan tests => 4 }
+
+use XML::SAX::PurePerl;
+
+my $handler = AttrHandler->new();
+ok($handler);
+
+my $parser = XML::SAX::PurePerl->new(Handler => $handler);
+ok($parser);
+
+$parser->parse_string('<code amp="&amp;" x3E="&#x3E;" num="&#65;" />');
+ok(1); # parser didn't die
+
+my $expected = "amp=& num=A x3E=> ";
+ok($handler->attributes, $expected);
+
+exit;
+
+
+package AttrHandler;
+
+use base 'XML::SAX::Base';
+
+sub start_document { shift->{_buf} = '';             }
+sub attributes     { shift->{_buf};                  }
+
+sub start_element {
+    my($self, $data) = @_;
+    my $attr = $data->{Attributes};
+    foreach (sort keys %$attr) {
+        $self->{_buf} .= "$attr->{$_}->{LocalName}=$attr->{$_}->{Value} ";
+    }
+}
+>>>>>>> .merge-right.r31256




More information about the Pkg-perl-cvs-commits mailing list