Hello community,
here is the log from the commit of package perl-XML-Twig for openSUSE:Factory
checked in at Sun Dec 19 14:39:22 CET 2010.
--------
--- perl-XML-Twig/perl-XML-Twig.changes 2010-12-01 14:58:26.000000000 +0100
+++ /mounts/work_src_done/STABLE/perl-XML-Twig/perl-XML-Twig.changes 2010-12-16 13:56:09.000000000 +0100
@@ -1,0 +2,7 @@
+Thu Dec 16 13:39:34 CET 2010 - anicka@suse.cz
+
+- update to 3.37
+ *fixed: more tests fixed for HTML::TreeBuilder, hopefully
+ will pass now
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
XML-Twig-3.36.tar.bz2
New:
----
XML-Twig-3.37.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-XML-Twig.spec ++++++
--- /var/tmp/diff_new_pack.WDVvAD/_old 2010-12-19 14:39:15.000000000 +0100
+++ /var/tmp/diff_new_pack.WDVvAD/_new 2010-12-19 14:39:15.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package perl-XML-Twig (Version 3.36 )
+# spec file for package perl-XML-Twig (Version 3.37 )
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -19,8 +19,8 @@
Name: perl-XML-Twig
-Version: 3.36
-Release: 3
+Version: 3.37
+Release: 1
Requires: perl-XML-Parser
BuildRequires: perl-XML-Parser
BuildRequires: perl-macros
++++++ XML-Twig-3.36.tar.bz2 -> XML-Twig-3.37.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Twig-3.36/Changes new/XML-Twig-3.37/Changes
--- old/XML-Twig-3.36/Changes 2010-09-24 14:55:17.000000000 +0200
+++ new/XML-Twig-3.37/Changes 2010-10-09 07:45:32.000000000 +0200
@@ -1,9 +1,14 @@
$Id: /xmltwig/trunk/Changes 33 2008-04-30T08:03:41.004487Z mrodrigu $
CHANGES
+version 3.37
+date: 2010-10-08
+# minor maintenance release
+fixed: more tests fixed for HTML::TreeBuilder, hopefully
+ will pass now
version 3.36
-date:
+date: 2010-10-07
# minor maintenance release
added: the use_tidy option to XML::Twig->new, which uses
HTML::Tidy to convert HTML to well-formed XHTML, as an
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Twig-3.36/META.yml new/XML-Twig-3.37/META.yml
--- old/XML-Twig-3.36/META.yml 2010-10-07 10:33:46.000000000 +0200
+++ new/XML-Twig-3.37/META.yml 2010-10-10 07:52:02.000000000 +0200
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: XML-Twig
-version: 3.36
+version: 3.37
abstract: XML, The Perl Way
author:
- Michel Rodriguez
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Twig-3.36/Twig.pm new/XML-Twig-3.37/Twig.pm
--- old/XML-Twig-3.36/Twig.pm 2010-10-07 10:33:45.000000000 +0200
+++ new/XML-Twig-3.37/Twig.pm 2010-10-10 07:52:01.000000000 +0200
@@ -97,7 +97,7 @@
BEGIN
{
-$VERSION = '3.36';
+$VERSION = '3.37';
use XML::Parser;
my $needVersion = '2.23';
@@ -936,15 +936,24 @@
{ $$xml=~ s{<\?xml.*?\?>}{}g;
#warn " fixed xml declaration in the wrong place\n";
}
- elsif( $@=~ m{^\s*undefined entity}m)
- { $$xml=~ s{&(amp;)?Amp;}{&}g; # if $Amp; is used instead of & then HTML::TreeBuilder's as_xml is tripped
- if( _use( 'HTML::Entities::Numbered'))
- { $$xml=name2hex_xml( $$xml);
- }
+ elsif( $@=~ m{undefined entity})
+ { $$xml=~ s{&(amp;)?Amp;}{&}g if $HTML::TreeBuilder::VERSION < 4.00;
+ $$xml=name2hex_xml( $$xml) if _use( 'HTML::Entities::Numbered');
}
+ elsif( $@=~ m{&Amp; used in html})
+ # if $Amp; is used instead of & then HTML::TreeBuilder's as_xml is tripped (old version)
+ { $$xml=~ s{&(amp;)?Amp;}{&}g if $HTML::TreeBuilder::VERSION < 4.00;
+ }
elsif( $@=~ m{^\s*not well-formed \(invalid token\)})
- { if( $$xml=~ m{]* )(\d+=)"}{$1a$2"}g; # comes out as , "fix the attribute
+ }
+ my $q= ']* )(\d+=)"}{$1a$2"}g; # comes out as , "fix the attribute
+ }
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Twig-3.36/Twig_pm.slow new/XML-Twig-3.37/Twig_pm.slow
--- old/XML-Twig-3.36/Twig_pm.slow 2010-09-24 14:54:11.000000000 +0200
+++ new/XML-Twig-3.37/Twig_pm.slow 2010-10-09 18:17:09.000000000 +0200
@@ -97,7 +97,7 @@
BEGIN
{
-$VERSION = '3.36';
+$VERSION = '3.37';
use XML::Parser;
my $needVersion = '2.23';
@@ -936,15 +936,24 @@
{ $$xml=~ s{<\?xml.*?\?>}{}g;
#warn " fixed xml declaration in the wrong place\n";
}
- elsif( $@=~ m{^\s*undefined entity}m)
- { $$xml=~ s{&(amp;)?Amp;}{&}g; # if $Amp; is used instead of & then HTML::TreeBuilder's as_xml is tripped
- if( _use( 'HTML::Entities::Numbered'))
- { $$xml=name2hex_xml( $$xml);
- }
+ elsif( $@=~ m{undefined entity})
+ { $$xml=~ s{&(amp;)?Amp;}{&}g if $HTML::TreeBuilder::VERSION < 4.00;
+ $$xml=name2hex_xml( $$xml) if _use( 'HTML::Entities::Numbered');
}
+ elsif( $@=~ m{&Amp; used in html})
+ # if $Amp; is used instead of & then HTML::TreeBuilder's as_xml is tripped (old version)
+ { $$xml=~ s{&(amp;)?Amp;}{&}g if $HTML::TreeBuilder::VERSION < 4.00;
+ }
elsif( $@=~ m{^\s*not well-formed \(invalid token\)})
- { if( $$xml=~ m{]* )(\d+=)"}{$1a$2"}g; # comes out as , "fix the attribute
+ }
+ my $q= ']* )(\d+=)"}{$1a$2"}g; # comes out as , "fix the attribute
+ }
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Twig-3.36/t/test_3_27.t new/XML-Twig-3.37/t/test_3_27.t
--- old/XML-Twig-3.36/t/test_3_27.t 2010-09-20 18:51:37.000000000 +0200
+++ new/XML-Twig-3.37/t/test_3_27.t 2010-10-10 07:50:03.000000000 +0200
@@ -224,41 +224,28 @@
is( XML::Twig->nparse_ppe( $doc)->sprint, $indented_doc, "nparse_ppe output");
}
-if( _use( 'HTML::TreeBuilder') )
+if( _use( 'HTML::TreeBuilder', 4.00) )
{ # first alternative is pre-3.23_1, second one with 3.23_1 (and beyond?)
- my $att_error= qr{(^\s*not well-formed|has an invalid attribute name)}s;
{ my $doc=qq{<html><head></head><body><p>dummy</p>\</body></html>};
eval { XML::Twig->nparse( $doc); };
- if( $HTML::TreeBuilder::VERSION <= 3.23)
- { matches( $@, $att_error, "error in html (normal mode)"); }
- else
- { nok( $@, "html with wrong attribute (normal mode)"); }
+ ok( $@, "error in html (normal mode, HTB < 2.23 or >= 4.00): $@");
eval { XML::Twig->nparse_e( $doc); };
- if( $HTML::TreeBuilder::VERSION <= 3.23)
- { matches( $@, $att_error, "error in html (nparse_e mode)"); }
- else
- { nok( $@, "html with wrong attribute (nparse_e mode)"); }
+ ok( $@, "error in html (nparse_e mode): $@");
}
{ my $doc=qq{<html><head></head><body><!-- <foo> bar </foo> -->dummy</p></body></html>};
eval { XML::Twig->nparse_e( $doc); };
- if( $HTML::TreeBuilder::VERSION <= 3.23)
- { matches( $@, $att_error, "error in html (nparse_e mode 2)"); }
- else
- { nok( $@, "html with wrong attribute (nparse_e mode 2)"); }
+ ok( $@, "error in html (nparse_e mode 2, HTB < 3.23 or >= 4.00: $@)");
}
{ my $doc=qq{<html><head></head><body><![CDATA[ <foo> bar </foo> ]]>\n\n
dummy</p></body>\n</html>};
eval { XML::Twig->nparse_e( $doc); };
- if( $HTML::TreeBuilder::VERSION <= 3.23)
- { matches( $@, $att_error, "error in html (nparse_e mode 3)"); }
- else
- { nok( $@, "html with wrong attribute (nparse_e mode 3)"); }
+ ok( $@, "error in html (nparse_e mode 3, HTB < 3.23 or >= 4.00: $@)");
}
}
else
- { skip( 4 => "need HTML::TreeBuilder to test error display with HTML data"); }
+ { skip( 4 => "need HTML::TreeBuilder > 4.00 to test error display with HTML data"); }
{ my $e= XML::Twig::Elt->new( 'e');
is( $e->tag_to_span->sprint, '<span class="e"/>', "tag_to_span");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Twig-3.36/t/test_3_36.t new/XML-Twig-3.37/t/test_3_36.t
--- old/XML-Twig-3.36/t/test_3_36.t 2010-09-24 14:54:28.000000000 +0200
+++ new/XML-Twig-3.37/t/test_3_36.t 2010-10-09 09:39:36.000000000 +0200
@@ -239,10 +239,12 @@
}
{ if( XML::Twig::_use( 'HTML::TreeBuilder'))
- { is( XML::Twig->new->parse_html( '<html><head></head><body>&Amp;</body></html>')->sprint,
- '<html><head></head><body>&</body></html>',
- '&Amp; used in html'
- );
+ { my $html_with_Amp= XML::Twig->new->parse_html( '<html><head></head><body>&Amp;</body></html>')->sprint;
+ if( $HTML::TreeBuilder::VERSION < 4.00)
+ { is( $html_with_Amp, '<html><head></head><body>&</body></html>', '&Amp; used in html (fixed HTB < 4.00)'); }
+ else
+ { is( $html_with_Amp, '<html><head></head><body>&Amp;</body></html>', '&Amp; used in html (NOT fixed HTB > r.00)'); }
+
is( XML::Twig->new->parse_html( '<html><head></head><body><?xml version="1.0" ?></body></html>')->sprint,
'<html><head></head><body></body></html>',
'extra XML declaration in html'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Twig-3.36/t/test_bugs_3_22.t new/XML-Twig-3.37/t/test_bugs_3_22.t
--- old/XML-Twig-3.36/t/test_bugs_3_22.t 2010-09-20 18:51:37.000000000 +0200
+++ new/XML-Twig-3.37/t/test_bugs_3_22.t 2010-10-08 09:22:46.000000000 +0200
@@ -197,9 +197,9 @@
}
{ # test parsing of an html string
- if( XML::Twig::_use( 'HTML::TreeBuilder', 3.13))
+ if( XML::Twig::_use( 'HTML::TreeBuilder', 3.13) && XML::Twig::_use( 'HTML::Entities::Numbered'))
{
- ok( XML::Twig->nparse_e( '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+ ok( XML::Twig->parse( error_context => 1, '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="/s/style.css" type="text/css">
@@ -212,7 +212,7 @@
</html>'), "parsing an html string");
}
else
- { skip( 1, "need HTML::TreeBuilder 3.13+ for those tests"); }
+ { skip( 1, "need HTML::TreeBuilder 3.13+ and HTML::Entities::Numbered for this test"); }
}
{ # testing print_to_file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/XML-Twig-3.36/t/zz_dump_config.t new/XML-Twig-3.37/t/zz_dump_config.t
--- old/XML-Twig-3.36/t/zz_dump_config.t 2010-09-20 18:51:37.000000000 +0200
+++ new/XML-Twig-3.37/t/zz_dump_config.t 2010-10-08 09:21:38.000000000 +0200
@@ -65,6 +65,7 @@
warn version( XML::XPath, 'to use XML::Twig::XPath if Tree::XPathEngine not available');
warn version( LWP, 'for the parseurl method');
warn version( HTML::TreeBuilder, 'to use parse_html and parsefile_html');
+warn version( HTML::Entities::Numbered, 'to allow parsing of HTML containing named entities');
warn version( HTML::Tidy, 'to use parse_html and parsefile_html with the use_tidy option');
warn version( HTML::Entities, 'for the html_encode filter');
warn version( Tie::IxHash, 'for the keep_atts_order option');
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org