implement ?:foo syntax and make ?foo positional
[catagits/Web-Simple.git] / t / tags.t
index c58e7e5..747382e 100644 (file)
--- a/t/tags.t
+++ b/t/tags.t
@@ -25,13 +25,19 @@ use Test::More qw(no_plan);
     <html>, <body id="spoon">, "YAY", </body>, </html>;
   }
 
+  sub fleem {
+    use XML::Tags qw(woo);
+    my $ent = "one&two";
+    <woo ent="$ent">;
+  }
+
   sub globbery {
     <t/globbery/*>;
   }
 }
 
 is(
-  join(', ', XML::Tags::sanitize Foo::foo()),
+  join(', ', XML::Tags::to_xml_string Foo::foo()),
   '<one>, <two>, <three>',
   'open tags ok'
 );
@@ -39,18 +45,24 @@ is(
 ok(!eval { Foo::bar(); 1 }, 'Death on use of unimported tag');
 
 is(
-  join(', ', XML::Tags::sanitize Foo::baz()),
+  join(', ', XML::Tags::to_xml_string Foo::baz()),
   '</bar>',
   'close tag ok'
 );
 
 is(
-  join('', XML::Tags::sanitize Foo::quux),
+  join('', HTML::Tags::to_html_string Foo::quux),
   '<html><body id="spoon">YAY</body></html>',
   'HTML tags ok'
 );
 
 is(
+  join('', XML::Tags::to_xml_string Foo::fleem),
+  '<woo ent="one&amp;two">',
+  'Escaping ok'
+);
+
+is(
   join(', ', Foo::globbery),
   't/globbery/one, t/globbery/two',
   'real glob re-installed ok'