@@ -0,0 +1 @@
+Per M. David Moussa Leo Keita: I need to compare HTML files using an
\ No newline at end of file
@@ -1,4 +1,4 @@
-This software is copyright (c) 2011 by Terrence Brannon.
+This software is copyright (c) 2012 by Terrence Brannon.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
@@ -12,7 +12,7 @@ b) the "Artistic License"
--- The GNU General Public License, Version 1, February 1989 ---
-This software is Copyright (c) 2011 by Terrence Brannon.
+This software is Copyright (c) 2012 by Terrence Brannon.
This is free software, licensed under:
@@ -272,7 +272,7 @@ That's all there is to it!
--- The Artistic License 1.0 ---
-This software is Copyright (c) 2011 by Terrence Brannon.
+This software is Copyright (c) 2012 by Terrence Brannon.
This is free software, licensed under:
@@ -1,3 +1,4 @@
+#TODO#
Changes
LICENSE
MANIFEST
@@ -14,7 +14,7 @@ build_requires:
configure_requires:
ExtUtils::MakeMaker: 6.30
dynamic_config: 0
-generated_by: 'Dist::Zilla version 4.200012, CPAN::Meta::Converter version 2.110930'
+generated_by: 'Dist::Zilla version 4.200012, CPAN::Meta::Converter version 2.112150'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -32,4 +32,4 @@ requires:
List::Util: 0
Params::Validate: 0
Scalar::Listify: 0
-version: 5.112170
+version: 5.120100
@@ -41,7 +41,7 @@ my %WriteMakefileArgs = (
'Params::Validate' => '0',
'Scalar::Listify' => '0'
},
- 'VERSION' => '5.112170',
+ 'VERSION' => '5.120100',
'test' => {
'TESTS' => 't/*.t'
}
@@ -1,11 +1,11 @@
This archive contains the distribution HTML-Element-Library,
-version 5.112170:
+version 5.120100:
Convenience methods for HTML::TreeBuilder and HTML::Element
-This software is copyright (c) 2011 by Terrence Brannon.
+This software is copyright (c) 2012 by Terrence Brannon.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
@@ -1,6 +1,6 @@
package HTML::Element::Library;
BEGIN {
- $HTML::Element::Library::VERSION = '5.112170';
+ $HTML::Element::Library::VERSION = '5.120100';
}
# ABSTRACT: Convenience methods for HTML::TreeBuilder and HTML::Element
@@ -1223,6 +1223,10 @@ down instead:
Terrence Brannon, E<lt>tbone@cpan.orgE<gt>
+I appreciate the feedback from M. David Moussa Leo Keita regarding some issues with the
+test suite, namely (1) CRLF leading to test breakage in F<t/crunch.t> and (2) using the
+wrong module in F<t/prune.t> thus not having the right functionality available.
+
Many thanks to BARBIE for his RT bug report.
Many thanks to perlmonk kcott for his work on array rewriting:
@@ -6,7 +6,7 @@ use File::Slurp;
require Exporter;
@ISA=qw(Exporter);
-@EXPORT = qw(ptree html_dir);
+@EXPORT = qw(ptree html_dir strip_ws);
sub html_dir {
't/html/'
@@ -24,6 +24,12 @@ sub ptree {
join '', @$lines;
}
+sub strip_ws {
+ my($str)=@_;
+
+ $str =~ s/\s+//g;
+ $str;
+}
1;
@@ -8,6 +8,7 @@ use Test::More;
use TestUtils;
use HTML::TreeBuilder;
use HTML::Element::Library;
+use Test::XML;
sub tage {
@@ -18,9 +19,14 @@ sub tage {
$tree->crunch(look_down => [ class => 'imageElement' ], leave => 1);
- my $generated_html = ptree($tree, "$root.gen");
+ my $generated_html = strip_ws ( ptree($tree, "$root.gen") );
+ # must put read_file() in scalar context so that a string instead of first line is returned.
+ my $expected_html = strip_ws(scalar File::Slurp::read_file("$root.exp"));
- is ($generated_html, File::Slurp::read_file("$root.exp"), "HTML for crunch");
+ #warn "g:$generated_html";
+ #warn "e:$expected_html";
+
+ is ($generated_html, $expected_html, "HTML for crunch");
}
@@ -9,7 +9,7 @@ use Test::XML;
BEGIN {
use_ok('HTML::TreeBuilder');
- use_ok('HTML::Element::Prune');
+ use_ok('HTML::Element::Library');
}