<html>, <body id="spoon">, "YAY", </body>, </html>;
}
+ sub xquux {
+ use HTML::Tags;
+ <link href="#self" rel="me" />,
+ <table>,<tr>,<td>,'x',<sub>,1,</sub>,</td>,</tr>,</table>;
+ }
+
sub fleem {
use XML::Tags qw(woo);
- my $ent = "one&two";
+ my $ent = 'one&two<three>"four';
<woo ent="$ent">;
}
<woo>, \$data, </woo>;
}
+ sub HTML_comment {
+ use HTML::Tags;
+ <!-- this is a comment -->;
+ }
+
+ sub PI {
+ use XML::Tags;
+ <?xml version="1.0" encoding="UTF-8"?>;
+ }
+
+ sub DTD {
+ use HTML::Tags;
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+ }
+
sub globbery {
<t/globbery/*>;
}
);
is(
+ join('', HTML::Tags::to_html_string Foo::xquux),
+ '<link href="#self" rel="me" />' .
+ '<table><tr><td>x<sub>1</sub></td></tr></table>',
+ 'Conflicting HTML tags ok'
+);
+
+is(
+ join('', XML::Tags::to_xml_string Foo::HTML_comment),
+ '<!-- this is a comment -->',
+ 'HTML comment ok'
+);
+
+is(
join('', XML::Tags::to_xml_string Foo::fleem),
- '<woo ent="one&two">',
+ '<woo ent="one&two<three>"four">',
'Escaping ok'
);
);
is(
+ join('', XML::Tags::to_xml_string Foo::PI),
+ '<?xml version="1.0" encoding="UTF-8"?>',
+ 'XML processing instruction'
+);
+
+is(
+ join('', HTML::Tags::to_html_string Foo::DTD),
+ '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
+ 'DTD ok'
+);
+
+is(
join(', ', Foo::globbery),
't/globbery/one, t/globbery/two',
'real glob re-installed ok'