Skip Menu |

This queue is for tickets about the libwww-perl CPAN distribution.

Report information
The Basics
Id: 25286
Status: resolved
Priority: 0/
Queue: libwww-perl

People
Owner: Nobody in particular
Requestors: jdhedden [...] cpan.org
Cc:
AdminCc:

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



Subject: Skip tests if no Encode
The attached patch skips affected tests if Encode is not built into Perl.
Subject: libwww_perl.patch
--- libwww-perl-5.805/t/base/message.t 2005-09-20 14:34:02.000000000 -0400 +++ libwww-perl-5.805-patched/t/base/message.t 2007-03-05 09:42:02.000000000 -0500 @@ -6,6 +6,7 @@ plan tests => 95; require HTTP::Message; +require Config; my($m, $m2, @parts); @@ -339,7 +340,8 @@ $m->content("H4sICFWAq0ECA3h4eAB7v3u/R6ZCSUZqUarCoxm7uAAZKHXiEAAAAA==\n"); $@ = ""; -skip($] < 5.008 ? "No Encode module" : "", +skip(($] < 5.008) || ($Config::Config{'extensions'} !~ /\bEncode\b/) + ? "No Encode module" : "", sub { eval { $m->decoded_content } }, "\x{FEFF}Hi there \x{263A}\n"); ok($@ || "", ""); ok($m->content, "H4sICFWAq0ECA3h4eAB7v3u/R6ZCSUZqUarCoxm7uAAZKHXiEAAAAA==\n"); @@ -348,7 +350,8 @@ $m->content($tmp); $m->header("Content-Encoding", "gzip"); $@ = ""; -skip($] < 5.008 ? "No Encode module" : "", +skip(($] < 5.008) || ($Config::Config{'extensions'} !~ /\bEncode\b/) + ? "No Encode module" : "", sub { eval { $m->decoded_content } }, "\x{FEFF}Hi there \x{263A}\n"); ok($@ || "", ""); ok($m->content, $tmp);
Applied. In 5.806.