1 use strict; use warnings FATAL => 'all';
2 use Test::More qw(no_plan);
5 BEGIN { $globbery = join(', ', <t/globbery/o* t/globbery/t*>) }
11 use XML::Tags qw(one two three);
12 <one>, <two>, <three>;
16 no warnings 'once'; # this is supposed to warn, it's broken
21 use XML::Tags qw(bar);
27 <html>, <body id="spoon">, "YAY", </body>, </html>;
32 <link href="#self" rel="me" />,
33 <table>,<tr>,<td>,'x',<sub>,1,</sub>,</td>,</tr>,</table>;
37 use XML::Tags qw(woo);
38 my $ent = 'one&two<three>"four';
43 use XML::Tags qw(woo);
44 my $data = "one&two<three>four";
46 <woo>, \$data, </woo>;
51 <!-- this is a comment -->;
56 <?xml version="1.0" encoding="UTF-8"?>;
61 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
65 <t/globbery/o* t/globbery/t*>;
70 join(', ', XML::Tags::to_xml_string Foo::foo()),
71 '<one>, <two>, <three>',
75 ok(!eval { Foo::bar(); 1 }, 'Death on use of unimported tag');
78 join(', ', XML::Tags::to_xml_string Foo::baz()),
84 join('', HTML::Tags::to_html_string Foo::quux),
85 '<html><body id="spoon">YAY</body></html>',
90 join('', HTML::Tags::to_html_string Foo::xquux),
91 '<link href="#self" rel="me" />' .
92 '<table><tr><td>x<sub>1</sub></td></tr></table>',
93 'Conflicting HTML tags ok'
97 join('', XML::Tags::to_xml_string Foo::HTML_comment),
98 '<!-- this is a comment -->',
103 join('', XML::Tags::to_xml_string Foo::fleem),
104 '<woo ent="one&two<three>"four">',
109 join('', XML::Tags::to_xml_string Foo::flaax),
110 '<woo>one&two<three>four</woo><woo>one&two<three>four</woo>',
111 'Escaping user data ok'
115 join('', XML::Tags::to_xml_string Foo::PI),
116 '<?xml version="1.0" encoding="UTF-8"?>',
117 'XML processing instruction'
121 join('', HTML::Tags::to_html_string Foo::DTD),
122 '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
127 join(', ', Foo::globbery),
129 'real glob re-installed ok'