This is an automated email from the git hooks/post-receive script. fsfs pushed a commit to annotated tag release/0.10-TRIAL in repository libhtml-scrubber-perl.
commit e2a61e6ed621fa81a9fcf950ea725ea251cdf052 Author: Nigel Metheringham <[email protected]> Date: Sat Dec 22 20:00:01 2012 +0000 Updated tests for new RT issues --- README.pod | 8 ++++---- t/rt72659_utf8.t | 2 +- t/rt79044_multiple.t | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 5 deletions(-) diff --git a/README.pod b/README.pod index 5276bcc..9b2cc0b 100644 --- a/README.pod +++ b/README.pod @@ -6,7 +6,7 @@ HTML::Scrubber - Perl extension for scrubbing/sanitizing html =head1 VERSION -version 0.09 +version 0.10 =head1 SYNOPSIS @@ -143,7 +143,7 @@ Takes tag, rule('_' || $tag), attrref. =for comment _scrub_str I<default> handler, used by both _scrub and _scrub_fh -Moved all the common code (ie all of it) into a single routine for +Moved all the common code (basically all of it) into a single routine for ease of maintenance =for comment _scrub_fh @@ -323,7 +323,7 @@ L<http://rt.cpan.org/Public/Dist/Display.html?Name=HTML-Scrubber>. =head1 AVAILABILITY -The project homepage is L<http://search.cpan.org/dist/HTML-Scrubber>. +The project homepage is L<https://metacpan.org/release/HTML-Scrubber>. The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit L<http://www.perl.com/CPAN/> to find a CPAN @@ -350,7 +350,7 @@ D. H. <[email protected]> =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2011 by Nigel Metheringham, 2003-2004 D. H.. +This software is copyright (c) 2012 by Nigel Metheringham, 2003-2004 D. H.. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. diff --git a/t/rt72659_utf8.t b/t/rt72659_utf8.t index 4041987..fff0a89 100644 --- a/t/rt72659_utf8.t +++ b/t/rt72659_utf8.t @@ -6,7 +6,7 @@ use strict; use utf8; use File::Spec; -use Test::More qw(no_plan); +use Test::More; use_ok('HTML::Scrubber'); diff --git a/t/rt79044_multiple.t b/t/rt79044_multiple.t new file mode 100644 index 0000000..ef839ba --- /dev/null +++ b/t/rt79044_multiple.t @@ -0,0 +1,33 @@ +# rt79044_multiple.t + +# this is to test for the problem described in RT #79044 + +use strict; +use Test::More; + +use_ok('HTML::Scrubber'); + +use HTML::Scrubber; +my @allow = qw[ p ]; +my $scrubber = HTML::Scrubber->new(); +$scrubber->allow(@allow); + +ok( $scrubber, "got scrubber" ); + +# all of these should go through unscathed +my @data = ( '<p>one</p>', '<p>two</p>', '<p>three</p>', '<p>four</p>' ); + +foreach my $datum (@data) { + is( $scrubber->scrub($datum), $datum, 'Test unscathed' ); +} + +# now do the same thing again, this time not allowing a <p> tag +$scrubber->allow(); + +foreach my $datum (@data) { + my $result = $datum; + $datum =~ s|</?p>||g; # strip with regexp - yay! + is( $scrubber->scrub($datum), $datum, 'Test processed' ); +} + +done_testing; -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libhtml-scrubber-perl.git _______________________________________________ Pkg-perl-cvs-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits
