Skip Menu |

This queue is for tickets about the HTML-Copy CPAN distribution.

Report information
The Basics
Id: 85949
Status: resolved
Priority: 0/
Queue: HTML-Copy

People
Owner: Nobody in particular
Requestors: gregoa [...] debian.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.31



From: gregoa [...] cpan.org
Subject: libhtml-copy-perl: FTBFS with perl 5.18: test failure
This bug has been forwarded from http://bugs.debian.org/711448 Source: libhtml-copy-perl Version: 1.30-1 Severity: important User: debian-perl@lists.debian.org Usertags: perl-5.18-transition Tags: sid jessie This package FTBFS with perl 5.18 from experimental (in a clean sbuild session): # Testing HTML::Copy 1.3, Perl 5.018000, /usr/bin/perl t/00-load.t .. ok Strings with code points over 0xFF may not be mapped into in-memory file handles readline() on closed filehandle $in at /build/dom-libhtml-copy-perl_1.30-1-i386- fEvCSD/libhtml-copy-perl-1.30/blib/lib/HTML/Copy.pm line 255. Use of uninitialized value in subroutine entry at /build/dom-libhtml-copy-perl_1 .30-1-i386-fEvCSD/libhtml-copy-perl-1.30/blib/lib/HTML/Copy.pm line 258. Use of uninitialized value in concatenation (.) or string at /build/dom-libhtml- copy-perl_1.30-1-i386-fEvCSD/libhtml-copy-perl-1.30/blib/lib/HTML/Copy.pm line 2 76. Can't guess encoding of at /build/dom-libhtml-copy-perl_1.30-1-i386-fEvCSD/libh tml-copy-perl-1.30/blib/lib/HTML/Copy.pm line 276. # Looks like you planned 16 tests but ran 6. # Looks like your test exited with 255 just after 6. t/parse.t .... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 1/2 test programs. 0/7 subtests failed. Failed 10/16 subtests Test Summary Report ------------------- t/parse.t (Wstat: 65280 Tests: 6 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 16 tests but ran 6. Files=2, Tests=7, 1 wallclock secs ( 0.02 usr 0.02 sys + 0.20 cusr 0.05 csys = 0.29 CPU) Result: FAIL -- Dominic Hargreaves | http://www.larted.org.uk/~dom/ PGP key 5178E2A5 from the.earth.li (keyserver,web,email) Thanks in advance, gregor herrmann, Debian Perl Group
Here's a patch that fixes the tests for me. Cheers, gregor
Subject: Strings_with_code_points_over_0xFF.patch
Description: Fix test failure. From perldiag in 5.18: . Strings with code points over 0xFF may not be mapped into in-memory file handles . (W utf8) You tried to open a reference to a scalar for read or append where the scalar contained code points over 0xFF. In-memory files model on-disk files and can only contain bytes. Origin: vendor Bug: http://rt.cpan.org/Public/Bug/Display.html?id=85949 Forwarded: not-yet Bug-Debian: http://bugs.debian.org/711448 Author: gregor herrmann <gregoa@debian.org> Last-Update: 2013-06-17 --- a/t/parse.t +++ b/t/parse.t @@ -6,6 +6,7 @@ use utf8; use File::Spec::Functions; #use Data::Dumper; +use Encode qw(encode_utf8 decode_utf8); use Test::More tests => 16; @@ -109,7 +110,7 @@ ok($copy_html eq $result_html_nocharset, "copy_to no charset shift_jis"); ##== HTML with charset uft-8 -my $src_html_utf8 = <<EOT; +my $src_html_utf8 = encode_utf8(<<EOT); <!DOCTYPE html> <html> <head> @@ -126,7 +127,7 @@ </html> EOT -my $result_html_utf8 = <<EOT; +my $result_html_utf8 = encode_utf8(<<EOT); <!DOCTYPE html> <html> <head> @@ -174,7 +175,7 @@ read_and_unlink($destination, $p); }; -ok($copy_html eq $result_html_utf8, "copy_to giviing a file handle"); +ok($copy_html eq decode_utf8($result_html_utf8), "copy_to giving a file handle"); ##=== copy_to gving file handles for input and output $copy_html = do { @@ -187,7 +188,7 @@ Encode::decode($p->encoding, $outdata); }; -ok($copy_html eq $result_html_utf8, "copy_to giviing file handles for input and output"); +ok($copy_html eq decode_utf8($result_html_utf8), "copy_to giving file handles for input and output"); ##=== parse_to giving a file handle $copy_html = do { @@ -196,7 +197,7 @@ $p->parse_to($destination); }; -ok($copy_html eq $result_html_utf8, "copy_to giviing file handles for input and output"); +ok($copy_html eq decode_utf8($result_html_utf8), "copy_to giving file handles for input and output"); ##=== copy_to with directory destination $copy_html = do {