File: 16-convert-mult-categories.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 (20 lines) | stat: -rw-r--r-- 486 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use strict;
use warnings;
use Test::More tests => 2;
use XML::Feed;

my $feed = XML::Feed->parse("t/samples/rss-multiple-categories.xml");

my ($entry) = $feed->entries;

is_deeply(
        [$entry->category()],
        ["foo", "bar", "quux", "simon's tags"],
"Got all categories");

my ($converted_entry) = $feed->convert('Atom')->entries;

is_deeply(
        [$converted_entry->category()],
        ["foo", "bar", "quux", "simon's tags"],
"All categories in place after conversion");