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

my $feed = XML::Feed->new('Atom');

my $other = XML::Feed->parse('t/samples/atom.xml')->convert('Atom');
$feed->splice($other);
is(scalar $feed->entries, 2, '2 entries in the feed after splicing');

$feed->splice($other);
is(scalar $feed->entries, 2, 'Still 2 entries after splicing again');

$other = XML::Feed->parse('t/samples/rss10.xml')->convert('Atom');
$feed->splice($other);
is(scalar $feed->entries, 4, 'Now 4 entries after splicing in RSS 1.0 feed');