1 use strict; use warnings FATAL => 'all';
2 use Test::More qw(no_plan);
9 use XML::Tags qw(one two three);
10 <one>, <two>, <three>;
14 no warnings 'once'; # this is supposed to warn, it's broken
19 use XML::Tags qw(bar);
25 <html>, <body id="spoon">, "YAY", </body>, </html>;
30 <link href="#self" rel="me" />,
31 <table>,<tr>,<td>,'x',<sub>,1,</sub>,</td>,</tr>,</table>;
35 use XML::Tags qw(woo);
36 my $ent = 'one&two<three>"four';
41 use XML::Tags qw(woo);
42 my $data = "one&two<three>four";
44 <woo>, \$data, </woo>;
49 <?xml version="1.0" encoding="UTF-8"?>;
54 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
63 join(', ', XML::Tags::to_xml_string Foo::foo()),
64 '<one>, <two>, <three>',
68 ok(!eval { Foo::bar(); 1 }, 'Death on use of unimported tag');
71 join(', ', XML::Tags::to_xml_string Foo::baz()),
77 join('', HTML::Tags::to_html_string Foo::quux),
78 '<html><body id="spoon">YAY</body></html>',
83 join('', HTML::Tags::to_html_string Foo::xquux),
84 '<link href="#self" rel="me" />' .
85 '<table><tr><td>x<sub>1</sub></td></tr></table>',
86 'Conflicting HTML tags ok'
90 join('', XML::Tags::to_xml_string Foo::fleem),
91 '<woo ent="one&two<three>"four">',
96 join('', XML::Tags::to_xml_string Foo::flaax),
97 '<woo>one&two<three>four</woo><woo>one&two<three>four</woo>',
98 'Escaping user data ok'
102 join('', XML::Tags::to_xml_string Foo::PI),
103 '<?xml version="1.0" encoding="UTF-8"?>',
104 'XML processing instruction'
108 join('', HTML::Tags::to_html_string Foo::DTD),
109 '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
114 join(', ', Foo::globbery),
115 't/globbery/one, t/globbery/two',
116 'real glob re-installed ok'