| 1 |
use strict; |
| 2 |
use warnings; |
| 3 |
use Test::More tests => 3; |
| 4 |
use XML::Feed; |
| 5 |
|
| 6 |
my $feed = XML::Feed->new('Atom'); |
| 7 |
|
| 8 |
my $other = XML::Feed->parse('t/samples/atom.xml')->convert('Atom'); |
| 9 |
$feed->splice($other); |
| 10 |
is(scalar $feed->entries, 2, '2 entries in the feed after splicing'); |
| 11 |
|
| 12 |
$feed->splice($other); |
| 13 |
is(scalar $feed->entries, 2, 'Still 2 entries after splicing again'); |
| 14 |
|
| 15 |
$other = XML::Feed->parse('t/samples/rss10.xml')->convert('Atom'); |
| 16 |
$feed->splice($other); |
| 17 |
is(scalar $feed->entries, 4, 'Now 4 entries after splicing in RSS 1.0 feed'); |