t/tags.t: HTML tags which conflict with Perl built-ins ok
[catagits/Web-Simple.git] / t / tags.t
index 46e5c8a..b82a439 100644 (file)
--- a/t/tags.t
+++ b/t/tags.t
@@ -25,6 +25,12 @@ use Test::More qw(no_plan);
     <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<three>"four';
@@ -74,6 +80,13 @@ is(
 );
 
 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::fleem),
   '<woo ent="one&amp;two&lt;three&gt;&quot;four">',
   'Escaping ok'