#!/usr/bin/perl use warnings; use strict; use XML::Atom::SimpleFeed; package XML::Atom::SimpleFeed; use Test::More tests => 7; is xml_escape( $_ = qq(<\x{FF34}\x{FF25}\x{FF33}\x{FF34} "&' d\xE3t\xE3>) ), qq(<TEST "&' dãtã>), 'XML tag content is properly encoded'; is xml_attr_escape( $_ = qq(<\x{FF34}\x{FF25}\x{FF33}\x{FF34}\n"&'\rd\xE3t\xE3>) ), qq(<TEST "&' dãtã>), 'XML attribute content is properly encoded'; is xml_string( $_ = qq(Test ]]> sections) ), qq(Test <CDATA> sections), 'CDATA sections are properly flattened'; is xml_tag( 'br' ), '
', 'simple tags are self-closed'; is xml_tag( 'b', 'foo', '
' ), 'foo
', 'tags with content are properly formed'; is xml_tag( [ 'br', clear => 'left' ] ), '
', 'simple tags can have attributes'; is xml_tag( [ 'b', style => 'color: red' ], 'foo', '
' ), 'foo
', 'simple tags can have attributes';