Refactor SC tests, separating encodings out into their own test file. TEST_ENCODINGS=1 to run this new test. 8/13 tests fail.

This commit is contained in:
Colin Kuskie 2010-08-24 15:24:22 -07:00
parent 91e0b46d7e
commit d13acd164d
14 changed files with 292 additions and 150 deletions

View file

@ -165,9 +165,9 @@ sub generateFeed {
# if the content can be downgraded, it is either valid latin1 or didn't have
# an HTTP Content-Encoding header. In the second case, XML::FeedPP will take
# care of any encoding specified in the XML prolog
utf8::downgrade($value, 1);
utf8::downgrade($value, 1) ? 1 : 0;
eval {
my $singleFeed = XML::FeedPP->new($value, utf8_flag => 1, -type => 'string', %opt);
my $singleFeed = XML::FeedPP->new($value, utf8_flag => 1, -type => 'string', xml_deref => 1, %opt);
$feed->merge_channel($singleFeed);
$feed->merge_item($singleFeed);
};
@ -176,7 +176,6 @@ sub generateFeed {
}
}
# build a new feed that matches the term the user is interested in
if ($self->hasTerms ne '') {
my @terms = split /,\s*/, $self->hasTerms; # get the list of terms