r68821 - in /trunk/libxml-tidy-perl: Build.PL CHANGES META.yml Makefile.PL README Tidy.pm debian/changelog t/00small.t t/01medium.t t/02large.t t/03prune.t
periapt-guest at users.alioth.debian.org
periapt-guest at users.alioth.debian.org
Wed Feb 16 20:06:17 UTC 2011
Author: periapt-guest
Date: Wed Feb 16 20:06:05 2011
New Revision: 68821
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=68821
Log:
New upstream release
Modified:
trunk/libxml-tidy-perl/Build.PL
trunk/libxml-tidy-perl/CHANGES
trunk/libxml-tidy-perl/META.yml
trunk/libxml-tidy-perl/Makefile.PL
trunk/libxml-tidy-perl/README
trunk/libxml-tidy-perl/Tidy.pm
trunk/libxml-tidy-perl/debian/changelog
trunk/libxml-tidy-perl/t/00small.t
trunk/libxml-tidy-perl/t/01medium.t
trunk/libxml-tidy-perl/t/02large.t
trunk/libxml-tidy-perl/t/03prune.t
Modified: trunk/libxml-tidy-perl/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-tidy-perl/Build.PL?rev=68821&op=diff
==============================================================================
--- trunk/libxml-tidy-perl/Build.PL (original)
+++ trunk/libxml-tidy-perl/Build.PL Wed Feb 16 20:06:05 2011
@@ -4,7 +4,7 @@
# 'module_name' => 'XML::Tidy',
'dist_name' => 'XML-Tidy',
# 'dist_version_from' => 'Tidy.pm',
- 'dist_version' => '1.6.A7RJKwl',
+ 'dist_version' => '1.8.B2AMvdl',
'dist_abstract' => 'tidy indenting of XML documents',
'dist_author' => 'Pip Stuart <Pip at CPAN.Org>',
# 'create_readme' => '1',
Modified: trunk/libxml-tidy-perl/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-tidy-perl/CHANGES?rev=68821&op=diff
==============================================================================
--- trunk/libxml-tidy-perl/CHANGES (original)
+++ trunk/libxml-tidy-perl/CHANGES Wed Feb 16 20:06:05 2011
@@ -1,5 +1,16 @@
CHANGES
Revision history for Perl extension XML::Tidy:
+
+ - 1.8.B2AMvdl Thu Feb 10 22:57:39:47 2011
+ * aligned .t code
+
+ * added test for newline before -r to try to resolve:
+ HTTPS://RT.CPAN.Org/Ticket/Display.html?id=65471 (Thanks, Leandro.)
+
+ * fixed off-by-one error when new gets a readable (non-newline)
+ filename (that's not "filename" without a pre-'filename' param) to
+ resolve: HTTPS://RT.CPAN.Org/Ticket/Display.html?id=65151 (Thanks,
+ Simone.)
- 1.6.A7RJKwl Tue Jul 27 19:20:58:47 2010
* added head2 POD for EXPORTED CONSTANTS to try to pass t/00podc.t
Modified: trunk/libxml-tidy-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-tidy-perl/META.yml?rev=68821&op=diff
==============================================================================
--- trunk/libxml-tidy-perl/META.yml (original)
+++ trunk/libxml-tidy-perl/META.yml Wed Feb 16 20:06:05 2011
@@ -1,7 +1,7 @@
--- #YAML:1.0
name: XML-Tidy
abstract: tidy indenting of XML documents
-version: 1.6.A7RJKwl
+version: 1.8.B2AMvdl
author:
- Pip Stuart <Pip at CPAN.Org>
license: gpl
Modified: trunk/libxml-tidy-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-tidy-perl/Makefile.PL?rev=68821&op=diff
==============================================================================
--- trunk/libxml-tidy-perl/Makefile.PL (original)
+++ trunk/libxml-tidy-perl/Makefile.PL Wed Feb 16 20:06:05 2011
@@ -3,7 +3,7 @@
# the contents of the Makefile that is written.
WriteMakefile(
'NAME' => 'XML::Tidy',
- 'VERSION' => '1.6.A7RJKwl',
+ 'VERSION' => '1.8.B2AMvdl',
'ABSTRACT' => 'tidy indenting of XML documents',
'AUTHOR' => 'Pip Stuart <Pip at CPAN.Org>',
'EXE_FILES' => [
Modified: trunk/libxml-tidy-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-tidy-perl/README?rev=68821&op=diff
==============================================================================
--- trunk/libxml-tidy-perl/README (original)
+++ trunk/libxml-tidy-perl/README Wed Feb 16 20:06:05 2011
@@ -2,8 +2,8 @@
XML::Tidy - tidy indenting of XML documents
VERSION
- This documentation refers to version 1.6.A7RJKwl of XML::Tidy, which was
- released on Tue Jul 27 19:20:58:47 2010.
+ This documentation refers to version 1.8.B2AMvdl of XML::Tidy, which was
+ released on Thu Feb 10 22:57:39:47 2011.
SYNOPSIS
use XML::Tidy;
@@ -275,6 +275,17 @@
CHANGES
Revision history for Perl extension XML::Tidy:
+ - 1.8.B2AMvdl Thu Feb 10 22:57:39:47 2011
+ * aligned .t code
+
+ * added test for newline before -r to try to resolve:
+ HTTPS://RT.CPAN.Org/Ticket/Display.html?id=65471 (Thanks, Leandro.)
+
+ * fixed off-by-one error when new gets a readable (non-newline)
+ filename (that's not "filename" without a pre-'filename' param) to
+ resolve: HTTPS://RT.CPAN.Org/Ticket/Display.html?id=65151 (Thanks,
+ Simone.)
+
- 1.6.A7RJKwl Tue Jul 27 19:20:58:47 2010
* added head2 POD for EXPORTED CONSTANTS to try to pass t/00podc.t
@@ -356,7 +367,7 @@
LICENSE
Most source code should be Free! Code I have lawful authority over is &&
- shall be! Copyright: (c) 2004-2010, Pip Stuart. Copyleft : This software
+ shall be! Copyright: (c) 2004-2011, Pip Stuart. Copyleft : This software
is licensed under the GNU General Public License (version 3). Please
consult the Free Software Foundation (http://FSF.Org) for important
information about your freedom.
Modified: trunk/libxml-tidy-perl/Tidy.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-tidy-perl/Tidy.pm?rev=68821&op=diff
==============================================================================
--- trunk/libxml-tidy-perl/Tidy.pm (original)
+++ trunk/libxml-tidy-perl/Tidy.pm Wed Feb 16 20:06:05 2011
@@ -8,7 +8,7 @@
use Exporter;
use Math::BaseCnv qw(:b64);
use XML::XPath::XMLParser;
-our $VERSION = '1.6.A7RJKwl'; our $PTVR = $VERSION; $PTVR =~ s/^\d+\.\d+\.//; # Please see `perldoc Time::PT` for an explanation of $PTVR.
+our $VERSION = '1.8.B2AMvdl'; our $PTVR = $VERSION; $PTVR =~ s/^\d+\.\d+\.//; # Please see `perldoc Time::PT` for an explanation of $PTVR.
@EXPORT = qw(
UNKNOWN_NODE
ELEMENT_NODE
@@ -55,8 +55,8 @@
elsif( $_[0] =~ /\.xtb$/i ){ $xpob = bexpand(@_ ); }
else { $xpob = XML::XPath->new(@_);
shift(@_) if($_[0] eq 'filename'); # special-case loading XML file with non-standard declaration
- if(-r $_[0]){ # special-case loading XML file with non-standard declaration (but doesn't handle inline XML data or IORef yet)
- open(XMLF,'<',$_[1]);$xmld = <XMLF>;close(XMLF);$xmld =~ s/(\?>).*/$1\n/; # if provided XML Declaration doesn't seem well-formed, ...
+ if($_[0] !~ /\n/ && -r $_[0]){ # special-case loading XML file with non-standard declaration (but doesn't handle inline XML data or IORef yet)
+ open(XMLF,'<',$_[0]);$xmld = <XMLF>;close(XMLF);$xmld =~ s/(\?>).*/$1\n/; # if provided XML Declaration doesn't seem well-formed, ...
$xmld = qq(<?xml version="1.0" encoding="utf-8"?>\n) unless($xmld =~ /^<\?xml version="[^"]+" encoding="[^"]+" *\?>\n$/); # ...reset to Standard
}
}
@@ -413,15 +413,15 @@
my $intz = shift(); my $fltz = shift();
my $ndty = shift(); my $node = shift();
my $tokn = ''; my $aval = undef; # token key && attribute value strings
- if (${$node}->getNodeType() == ELEMENT_NODE) {
+ if ( ${$node}->getNodeType() == ELEMENT_NODE) {
$tokn = ${$node}->getName();
- } elsif(${$node}->getNodeType() == ATTRIBUTE_NODE) {
+ } elsif( ${$node}->getNodeType() == ATTRIBUTE_NODE) {
$tokn = ${$node}->getName(); # attribute keys
$aval = ${$node}->getNodeValue(); # attribute values
$aval = '' unless(defined($aval));
- } elsif(${$node}->getNodeType() == NAMESPACE_NODE) {
+ } elsif( ${$node}->getNodeType() == NAMESPACE_NODE) {
$tokn = ${$node}->toString(); # namespace prefix && expanded
- } elsif(${$node}->getNodeType() == PROCESSING_INSTRUCTION_NODE) {
+ } elsif( ${$node}->getNodeType() == PROCESSING_INSTRUCTION_NODE) {
$tokn = ${$node}->getTarget(); # PI target
$aval = ${$node}->getData(); # PI data
$aval = '' unless(defined($aval));
@@ -777,7 +777,7 @@
=head1 VERSION
-This documentation refers to version 1.6.A7RJKwl of XML::Tidy, which was released on Tue Jul 27 19:20:58:47 2010.
+This documentation refers to version 1.8.B2AMvdl of XML::Tidy, which was released on Thu Feb 10 22:57:39:47 2011.
=head1 SYNOPSIS
@@ -1085,6 +1085,14 @@
=over 4
+=item - 1.8.B2AMvdl Thu Feb 10 22:57:39:47 2011
+
+* aligned .t code
+
+* added test for newline before -r to try to resolve: HTTPS://RT.CPAN.Org/Ticket/Display.html?id=65471 (Thanks, Leandro.)
+
+* fixed off-by-one error when new gets a readable (non-newline) filename (that's not "filename" without a pre-'filename' param) to resolve: HTTPS://RT.CPAN.Org/Ticket/Display.html?id=65151 (Thanks, Simone.)
+
=item - 1.6.A7RJKwl Tue Jul 27 19:20:58:47 2010
* added head2 POD for EXPORTED CONSTANTS to try to pass t/00podc.t
@@ -1133,7 +1141,7 @@
=item - 1.0.4CAJna1 Fri Dec 10 19:49:36:01 2004
-* added optional 'filename' => to write()
+* added optional 'filename' => to write()
=item - 1.0.4CAAf5B Fri Dec 10 10:41:05:11 2004
@@ -1181,7 +1189,7 @@
Most source code should be Free!
Code I have lawful authority over is && shall be!
-Copyright: (c) 2004-2010, Pip Stuart.
+Copyright: (c) 2004-2011, Pip Stuart.
Copyleft : This software is licensed under the GNU General Public
License (version 3). Please consult the Free Software Foundation
(http://FSF.Org) for important information about your freedom.
Modified: trunk/libxml-tidy-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-tidy-perl/debian/changelog?rev=68821&op=diff
==============================================================================
--- trunk/libxml-tidy-perl/debian/changelog (original)
+++ trunk/libxml-tidy-perl/debian/changelog Wed Feb 16 20:06:05 2011
@@ -1,3 +1,9 @@
+libxml-tidy-perl (1.8.B2AMvdl-1) UNRELEASED; urgency=low
+
+ * New upstream release
+
+ -- Nicholas Bamber <nicholas at periapt.co.uk> Wed, 16 Feb 2011 19:52:03 +0000
+
libxml-tidy-perl (1.6.A7RJKwl-1) unstable; urgency=low
[ Nathan Handler ]
Modified: trunk/libxml-tidy-perl/t/00small.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-tidy-perl/t/00small.t?rev=68821&op=diff
==============================================================================
--- trunk/libxml-tidy-perl/t/00small.t (original)
+++ trunk/libxml-tidy-perl/t/00small.t Wed Feb 16 20:06:05 2011
@@ -1,20 +1,16 @@
use Test;
BEGIN { plan tests => 15 }
-
use XML::Tidy;
-
my $tobj; ok(1);
-
sub diff { # test for difference between memory Tidy objects
my $tidy = shift() || return(0);
my $tstd = shift(); return(0) unless(defined($tstd) && $tstd);
my($root)= $tidy->findnodes('/');
my $xdat = qq(<?xml version="1.0" encoding="utf-8"?>\n);
- $xdat .= $_->toString() foreach($root->getChildNodes());
+ $xdat .= $_->toString() for($root->getChildNodes());
if($xdat eq $tstd) { return(1); } # 1 == files same
else { return(0); } # 0 == files diff
}
-
my $tst0 = qq|<?xml version="1.0" encoding="utf-8"?>
<root att0="kaka">
<kid0 />
@@ -36,28 +32,22 @@
<root att0="kaka">
<kid0 />
<kid1 />
-</root>|;
-
-$tobj = XML::Tidy->new($tst0);
-ok(defined($tobj));
-ok(diff($tobj, $tst0));
-ok($tobj->get_xml(), $tst0);
-
-$tobj->reload();
-ok(defined($tobj));
-ok(diff($tobj, $tst0));
-ok($tobj->get_xml(), $tst0);
-ok(diff($tobj, $tstA));
-
-$tobj->strip();
-ok(defined($tobj));
-ok(diff($tobj, $tstB));
-
-$tobj->tidy();
-ok(defined($tobj));
-ok(diff($tobj, $tstC));
-
-$tobj->tidy("\t");
-ok(defined($tobj));
-ok($tobj->get_xml(), $tstD);
-ok(diff($tobj, $tstD));
+</root>|; $tobj = XML::Tidy->new($tst0) ;
+ok(defined($tobj ));
+ok( diff($tobj, $tst0));
+ok( $tobj->get_xml(), $tst0 );
+ $tobj->reload();
+ok(defined($tobj ));
+ok( diff($tobj, $tst0));
+ok( $tobj->get_xml(), $tst0 );
+ok( diff($tobj, $tstA));
+ $tobj->strip();
+ok(defined($tobj ));
+ok( diff($tobj, $tstB));
+ $tobj->tidy();
+ok(defined($tobj ));
+ok( diff($tobj, $tstC));
+ $tobj->tidy("\t");
+ok(defined($tobj ));
+ok( $tobj->get_xml(), $tstD );
+ok( diff($tobj, $tstD));
Modified: trunk/libxml-tidy-perl/t/01medium.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-tidy-perl/t/01medium.t?rev=68821&op=diff
==============================================================================
--- trunk/libxml-tidy-perl/t/01medium.t (original)
+++ trunk/libxml-tidy-perl/t/01medium.t Wed Feb 16 20:06:05 2011
@@ -1,20 +1,16 @@
use Test;
BEGIN { plan tests => 15 }
-
use XML::Tidy;
-
my $tobj; ok(1);
-
sub diff { # test for difference between memory Tidy objects
my $tidy = shift() || return(0);
my $tstd = shift(); return(0) unless(defined($tstd) && $tstd);
my($root)= $tidy->findnodes('/');
my $xdat = qq(<?xml version="1.0" encoding="utf-8"?>\n);
- $xdat .= $_->toString() foreach($root->getChildNodes());
+ $xdat .= $_->toString() for($root->getChildNodes());
if($xdat eq $tstd) { return(1); } # 1 == files same
else { return(0); } # 0 == files diff
}
-
my $tst1 = qq|<?xml version="1.0" encoding="utf-8"?>
<t>
<u>
@@ -80,28 +76,22 @@
<v />
</w>
</u>
-</t>|;
-
-$tobj = XML::Tidy->new($tst1);
-ok(defined($tobj));
-ok(diff($tobj, $tst1));
-ok($tobj->get_xml(), $tst1);
-
-$tobj->reload();
-ok(defined($tobj));
-ok(diff($tobj, $tst1));
-ok($tobj->get_xml(), $tst1);
-ok(diff($tobj, $tstE));
-
-$tobj->strip();
-ok(defined($tobj));
-ok(diff($tobj, $tstF));
-
-$tobj->tidy();
-ok(defined($tobj));
-ok(diff($tobj, $tstG));
-
-$tobj->tidy("\t");
-ok(defined($tobj));
-ok($tobj->get_xml(), $tstH);
-ok(diff($tobj, $tstH));
+</t>|; $tobj = XML::Tidy->new($tst1) ;
+ok(defined($tobj ));
+ok( diff($tobj, $tst1));
+ok( $tobj->get_xml(), $tst1 );
+ $tobj->reload();
+ok(defined($tobj ));
+ok( diff($tobj, $tst1));
+ok( $tobj->get_xml(), $tst1 );
+ok( diff($tobj, $tstE));
+ $tobj->strip();
+ok(defined($tobj ));
+ok( diff($tobj, $tstF));
+ $tobj->tidy();
+ok(defined($tobj ));
+ok( diff($tobj, $tstG));
+ $tobj->tidy("\t");
+ok(defined($tobj ));
+ok( $tobj->get_xml(), $tstH );
+ok( diff($tobj, $tstH));
Modified: trunk/libxml-tidy-perl/t/02large.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-tidy-perl/t/02large.t?rev=68821&op=diff
==============================================================================
--- trunk/libxml-tidy-perl/t/02large.t (original)
+++ trunk/libxml-tidy-perl/t/02large.t Wed Feb 16 20:06:05 2011
@@ -1,16 +1,13 @@
use Test;
BEGIN { plan tests => 15 }
-
use XML::Tidy;
-
my $tobj; ok(1);
-
sub diff { # test for difference between mem XPath obj && disk XML file
my $tidy = shift() || return(0);
my $tstd = shift(); return(0) unless(defined($tstd) && $tstd);
my($root)= $tidy->findnodes('/');
my $xdat = qq(<?xml version="1.0" encoding="utf-8"?>\n);
- $xdat .= $_->toString() foreach($root->getChildNodes());
+ $xdat .= $_->toString() for($root->getChildNodes());
# split root PI's && comments with newlines again
$xdat =~ s/\?><\?/\?>\n<\?/g;
$xdat =~ s/\?><!--/\?>\n<!--/g;
@@ -433,28 +430,23 @@
<include href="XMLSchema-instance.rng" />
</div>
</grammar>|;
-
-$tobj = XML::Tidy->new($tst2);
-ok(defined($tobj));
-ok($tobj->get_xml(), $tst2);
-ok(diff($tobj, $tst2));
-ok($tobj->get_xml(), $tst2);
-
-$tobj->reload();
-ok(defined($tobj));
-ok(diff($tobj, $tst2));
-ok(defined($tobj));
-#ok($tobj->get_xml(), $tstI);
-ok(diff($tobj, $tstI));
-
-$tobj->strip();
-ok(defined($tobj));
-ok(diff($tobj, $tstJ));
-
-$tobj->tidy();
-ok(defined($tobj));
-ok(diff($tobj, $tstK));
-
-$tobj->tidy("\t");
-ok(defined($tobj));
-ok(diff($tobj, $tstL));
+ $tobj = XML::Tidy->new($tst2) ;
+ok(defined($tobj ));
+ok( $tobj->get_xml(), $tst2 );
+ok( diff($tobj, $tst2));
+ok( $tobj->get_xml(), $tst2 );
+ $tobj->reload();
+ok(defined($tobj ));
+ok( diff($tobj, $tst2));
+ok(defined($tobj ));
+#k( $tobj->get_xml(), $tstI );
+ok( diff($tobj, $tstI));
+ $tobj->strip();
+ok(defined($tobj ));
+ok( diff($tobj, $tstJ));
+ $tobj->tidy();
+ok(defined($tobj ));
+ok( diff($tobj, $tstK));
+ $tobj->tidy("\t");
+ok(defined($tobj ));
+ok( diff($tobj, $tstL));
Modified: trunk/libxml-tidy-perl/t/03prune.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-tidy-perl/t/03prune.t?rev=68821&op=diff
==============================================================================
--- trunk/libxml-tidy-perl/t/03prune.t (original)
+++ trunk/libxml-tidy-perl/t/03prune.t Wed Feb 16 20:06:05 2011
@@ -1,20 +1,16 @@
use Test;
BEGIN { plan tests => 15 }
-
use XML::Tidy;
-
my $tobj; ok(1);
-
sub diff { # test for difference between memory Tidy objects
my $tidy = shift() || return(0);
my $tstd = shift(); return(0) unless(defined($tstd) && $tstd);
my($root)= $tidy->findnodes('/');
my $xdat = qq(<?xml version="1.0" encoding="utf-8"?>\n);
- $xdat .= $_->toString() foreach($root->getChildNodes());
+ $xdat .= $_->toString() for($root->getChildNodes());
if($xdat eq $tstd) { return(1); } # 1 == files same
else { return(0); } # 0 == files diff
}
-
my $tst1 = q|<?xml version="1.0" encoding="utf-8"?>
<t>
<u>
@@ -98,38 +94,33 @@
<u />
<u />
</t>|;
-
-$tobj = XML::Tidy->new($tst1);
-ok(defined($tobj));
-ok(diff($tobj, $tst1));
-$tobj->prune('/t/u/v');
-ok(defined($tobj));
-ok(diff($tobj, $tstM));
-$tobj->strip();
-ok(diff($tobj, $tstN));
-$tobj->tidy();
-ok(diff($tobj, $tstO));
-
-$tobj = XML::Tidy->new($tst1);
-ok(diff($tobj, $tst1));
-$tobj->prune('//v');
-$tobj->tidy();
-ok(diff($tobj, $tstP));
-
-$tobj = XML::Tidy->new($tst1);
-ok(diff($tobj, $tst1));
-$tobj->prune('//v[@name="deux"]');
-$tobj->tidy();
-ok(diff($tobj, $tstQ));
-
-$tobj = XML::Tidy->new($tst1);
-ok(diff($tobj, $tst1));
-$tobj->prune('/t/u[2]');
-$tobj->tidy();
-ok(diff($tobj, $tstR));
-
-$tobj = XML::Tidy->new($tst1);
-ok(diff($tobj, $tst1));
-$tobj->prune('/t/u/*');
-$tobj->tidy();
-ok(diff($tobj, $tstS));
+ $tobj = XML::Tidy->new($tst1) ;
+ok(defined($tobj ));
+ok( diff($tobj, $tst1));
+ $tobj->prune('/t/u/v');
+ok(defined($tobj ));
+ok( diff($tobj, $tstM));
+ $tobj->strip();
+ok( diff($tobj, $tstN));
+ $tobj->tidy();
+ok( diff($tobj, $tstO));
+ $tobj = XML::Tidy->new($tst1) ;
+ok( diff($tobj, $tst1));
+ $tobj->prune('//v');
+ $tobj->tidy();
+ok( diff($tobj, $tstP));
+ $tobj = XML::Tidy->new($tst1) ;
+ok( diff($tobj, $tst1));
+ $tobj->prune('//v[@name="deux"]');
+ $tobj->tidy();
+ok( diff($tobj, $tstQ));
+ $tobj = XML::Tidy->new($tst1) ;
+ok( diff($tobj, $tst1));
+ $tobj->prune('/t/u[2]');
+ $tobj->tidy();
+ok( diff($tobj, $tstR));
+ $tobj = XML::Tidy->new($tst1) ;
+ok( diff($tobj, $tst1));
+ $tobj->prune('/t/u/*');
+ $tobj->tidy();
+ok( diff($tobj, $tstS));
More information about the Pkg-perl-cvs-commits
mailing list