4 use Test::More tests => 14;
11 my $rss = XML::Feed->parse(
12 File::Spec->catfile(File::Spec->curdir(),
13 "t", "samples", "rss20-double.xml"
18 isa_ok($rss, 'XML::Feed::Format::RSS');
19 my $rss_entry = ($rss->entries)[0];
22 isa_ok($rss_entry, 'XML::Feed::Entry::Format::RSS');
25 my $rss_content = $rss_entry->content;
28 isa_ok($rss_content, 'XML::Feed::Content');
31 is($rss_content->type, 'text/html', 'Correct content type');
34 like($rss_content->body, qr(<|<), 'Contains HTML tags');
37 like($rss_content->body,
38 qr{\Q<a href="http://search.cpan.org/perldoc?Dancer">Dancer</a>},
39 'Contains HTML tags');
41 unlike($rss->as_xml, qr{&lt;}, 'No double encoding');
43 my $atom = $rss->convert('Atom');
46 isa_ok($atom, 'XML::Feed::Format::Atom');
48 my $atom_entry = ($atom->entries)[0];
51 isa_ok($atom_entry, 'XML::Feed::Entry::Format::Atom');
53 my $atom_content = $atom_entry->content;
56 isa_ok($atom_content, 'XML::Feed::Content');
60 local $TODO = 'Needs more investigation';
61 is($atom_content->type, 'text/html', 'Correct content type');
65 like($atom_content->body, qr(<|<), 'Contains HTML tags');
68 like($atom_content->body,
69 qr{\Q<a href="http://search.cpan.org/perldoc?Dancer">Dancer</a>},
70 'Contains HTML tags');
72 unlike($atom->as_xml, qr{&lt;}, 'No double encoding');