t/tags.t: Test that Document Type Declaration (DTD or doctype) works
[catagits/Web-Simple.git] / t / tags.t
index 587bf63..dc67654 100644 (file)
--- a/t/tags.t
+++ b/t/tags.t
@@ -43,6 +43,11 @@ use Test::More qw(no_plan);
     <?xml version="1.0" encoding="UTF-8"?>;
   }
 
+  sub DTD {
+    use HTML::Tags;
+    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+  }
+
   sub globbery {
     <t/globbery/*>;
   }
@@ -87,6 +92,12 @@ is(
 );
 
 is(
+  join('', HTML::Tags::to_html_string Foo::DTD),
+  '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
+  'DTD ok'
+);
+
+is(
   join(', ', Foo::globbery),
   't/globbery/one, t/globbery/two',
   'real glob re-installed ok'