File: 13-category-hash-bug.t

package info (click to toggle)
libxml-feed-perl 0.59%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 496 kB
  • sloc: perl: 1,137; xml: 682; makefile: 2
file content (21 lines) | stat: -rw-r--r-- 518 bytes parent folder | download | duplicates (3)
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 !$@, $@;
    }
}