Debian Codegraph @

t/22-bug73160.t

raw ◀ ▶
1 Debian patch touch this file
1 use strict;
2 use warnings;
3
4 use Test::More;
5 use XML::Feed;
6
•7 plan skip_all => "t/samples/rss10-datespaces.xml does not exist" if(! -f "t/samples/rss10-datespaces.xml");
8
9 my $file = 't/samples/rss10-datespaces.xml';
10 my $feed = XML::Feed->parse($file);
11 isa_ok($feed, 'XML::Feed::Format::RSS');
12 ok(my $date = $feed->modified, 'Got a feed modified date');
13 isa_ok($date, 'DateTime');
14
15 my $link = $feed->link;
16 unlike($link, qr[^\s], 'No spaces at start of link');
17 unlike($link, qr[\s$], 'No spaces at end of link');
18
19 my $entry = ($feed->entries)[0];
20 ok(my $iss = $entry->issued, 'Got an entry issued date');
21 isa_ok($iss, 'DateTime');
22
23 $link = $entry->link;
24 unlike($link, qr[^\s], 'No spaces at start of link');
25 unlike($link, qr[\s$], 'No spaces at end of link');
26
27 done_testing;