File: 25-utf8-create.t

package info (click to toggle)
libxml-atom-perl 0.37-1%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 488 kB
  • ctags: 308
  • sloc: perl: 2,641; xml: 673; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 436 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use strict;
use Test::More 'no_plan';
use FindBin;
use XML::Atom::Feed;

my $feed = XML::Atom::Feed->new(Version => 1.0);
$feed->version; # 1.0
$feed->title("Dicion\xc3\xa1rios");
is $feed->title, "Dicion\xc3\xa1rios";

my $out = "$FindBin::Bin/utf8-create.xml";
open my $fh, ">", $out;
print $fh $feed->as_xml_utf8;
close $fh;

$feed = XML::Atom::Feed->new($out);
is $feed->title, "Dicion\xc3\xa1rios";

END { unlink $out if -e $out }