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 <!-- this is a comment -->;
54 <?xml version="1.0" encoding="UTF-8"?>;
59 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
68 join(', ', XML::Tags::to_xml_string Foo::foo()),
69 '<one>, <two>, <three>',
73 ok(!eval { Foo::bar(); 1 }, 'Death on use of unimported tag');
76 join(', ', XML::Tags::to_xml_string Foo::baz()),
82 join('', HTML::Tags::to_html_string Foo::quux),
83 '<html><body id="spoon">YAY</body></html>',
88 join('', HTML::Tags::to_html_string Foo::xquux),
89 '<link href="#self" rel="me" />' .
90 '<table><tr><td>x<sub>1</sub></td></tr></table>',
91 'Conflicting HTML tags ok'
95 join('', XML::Tags::to_xml_string Foo::HTML_comment),
96 '<!-- this is a comment -->',
101 join('', XML::Tags::to_xml_string Foo::fleem),
102 '<woo ent="one&two<three>"four">',
107 join('', XML::Tags::to_xml_string Foo::flaax),
108 '<woo>one&two<three>four</woo><woo>one&two<three>four</woo>',
109 'Escaping user data ok'
113 join('', XML::Tags::to_xml_string Foo::PI),
114 '<?xml version="1.0" encoding="UTF-8"?>',
115 'XML processing instruction'
119 join('', HTML::Tags::to_html_string Foo::DTD),
120 '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
125 join(', ', Foo::globbery),
126 't/globbery/one, t/globbery/two',
127 'real glob re-installed ok'