t/tags.t: Test that XML processing instruction (<?xml ... ?>) works
[catagits/Web-Simple.git] / t / tags.t
index 6c5a5e5..587bf63 100644 (file)
--- a/t/tags.t
+++ b/t/tags.t
@@ -38,6 +38,11 @@ use Test::More qw(no_plan);
     <woo>, \$data, </woo>;
   }
 
+  sub PI {
+    use XML::Tags;
+    <?xml version="1.0" encoding="UTF-8"?>;
+  }
+
   sub globbery {
     <t/globbery/*>;
   }
@@ -76,6 +81,12 @@ is(
 );
 
 is(
+  join('', XML::Tags::to_xml_string Foo::PI),
+  '<?xml version="1.0" encoding="UTF-8"?>',
+  'XML processing instruction'
+);
+
+is(
   join(', ', Foo::globbery),
   't/globbery/one, t/globbery/two',
   'real glob re-installed ok'