[libhtml-scrubber-perl] 03/13: UTF8 tests to attempt to reproduce RF72659 report

Florian Schlichting fsfs at moszumanska.debian.org
Sat Nov 11 13:46:05 UTC 2017


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 2de3c6434d6db57e434fc32c6f8b380d5a44a6ea
Author: Nigel Metheringham <nigelm at cpan.org>
Date:   Tue Feb 7 21:08:06 2012 +0000

    UTF8 tests to attempt to reproduce RF72659 report
    
    Cannot find an issue.  Leaving in place for now.
---
 t/rt72659_utf8.t | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/t/rt72659_utf8.t b/t/rt72659_utf8.t
new file mode 100644
index 0000000..4041987
--- /dev/null
+++ b/t/rt72659_utf8.t
@@ -0,0 +1,29 @@
+# Tests related to RG72659 - https://rt.cpan.org/Public/Bug/Display.html?id=72659
+#
+# I was unable to reproduce the errors described, but am leaving this in
+# place for now as it will catch any future issues with utf8 disjoints.
+#
+use strict;
+use utf8;
+use File::Spec;
+use Test::More qw(no_plan);
+
+use_ok('HTML::Scrubber');
+
+use HTML::Scrubber;
+
+my $source = "\x{DF}";
+utf8::upgrade($source);
+
+ok( utf8::is_utf8($source), 'Source string is marked UTF8' );
+ok( utf8::valid($source),   'Source string is valid UTF8' );
+
+# scrub it
+my $scrubber = HTML::Scrubber->new();
+my $result   = $scrubber->scrub($source);
+
+ok( utf8::is_utf8($result), 'Result string is marked UTF8' );
+ok( utf8::valid($result),   'Result string is valid UTF8' );
+is( $source, $result, 'Result = Source' );
+
+done_testing;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libhtml-scrubber-perl.git



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