1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
use strict;
use warnings;
use Test::More;
eval { require XML::RSS::LibXML };
plan skip_all => "XML::RSS::LibXML is required." if $@;
plan skip_all => "category-bug.xml does not exist" if(! -f "t/samples/category-bug.xml");
plan tests => 20;
use XML::Feed;
for my $parser (qw( XML::RSS XML::RSS::LibXML )) {
$XML::Feed::Format::RSS::PREFERRED_PARSER = $parser;
my $f = XML::Feed->parse("t/samples/category-bug.xml");
for my $e ($f->entries) {
eval { $e->category };
ok !$@, $@;
}
}
|