t/tags.t: HTML comments ok
Jakub Narebski [Wed, 16 Dec 2009 21:18:30 +0000 (22:18 +0100)]
Check that HTML comments, <!-- comment -->, work correctly.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>

t/tags.t

index b82a439..91edf08 100644 (file)
--- a/t/tags.t
+++ b/t/tags.t
@@ -44,6 +44,11 @@ use Test::More qw(no_plan);
     <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"?>;
@@ -87,6 +92,12 @@ is(
 );
 
 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&amp;two&lt;three&gt;&quot;four">',
   'Escaping ok'