File: regress-content-encoded.t

package info (click to toggle)
libxml-rss-libxml-perl 0.3105%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 484 kB
  • sloc: perl: 4,940; xml: 41; makefile: 2
file content (21 lines) | stat: -rw-r--r-- 458 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use strict;
use Test::More (tests => 2);
use XML::RSS::LibXML;

for my $version (qw(1.0 2.0)) {
    my $rss = XML::RSS::LibXML->new(version => "2.0");
    $rss->add_module(prefix => "content",
        uri => "http://purl.org/rss/1.0/modules/content/"
    );
    $rss->add_item(
        link => 'poo',
        content => {
            'encoded' => 'blah'
        },
        'title' => 'foo'
    );

    like($rss->as_string, qr/<content:encoded>/);
}
    
1;