File: 04-splice-atom.t

package info (click to toggle)
libxml-feed-perl 0.43%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 308 kB
  • ctags: 105
  • sloc: perl: 924; xml: 450; sh: 22; makefile: 16
file content (18 lines) | stat: -rw-r--r-- 576 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# $Id: 04-splice-atom.t 115 2008-12-01 21:17:51Z swistow $

use strict;
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');