X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Ftags.t;h=52dbc902c53370f3cad0f6d81abdc28b1b4c1d3e;hb=724b313633f9aa2d5e4e75018ec3af59ae4668ef;hp=46e5c8adf53f4c1671403e45ed9c46c995d6e021;hpb=be64ff24114973ab4be59e5b91296f6816b6e14a;p=catagits%2FWeb-Simple.git diff --git a/t/tags.t b/t/tags.t index 46e5c8a..52dbc90 100644 --- a/t/tags.t +++ b/t/tags.t @@ -1,6 +1,8 @@ use strict; use warnings FATAL => 'all'; use Test::More qw(no_plan); +my $globbery; +BEGIN { $globbery = join(', ', ) } { package Foo; @@ -25,6 +27,12 @@ use Test::More qw(no_plan); , , "YAY", , ; } + sub xquux { + use HTML::Tags; + , + ,,,,
,'x',,1,,
; + } + sub fleem { use XML::Tags qw(woo); my $ent = 'one&two"four'; @@ -38,6 +46,11 @@ use Test::More qw(no_plan); , \$data, ; } + sub HTML_comment { + use HTML::Tags; + ; + } + sub PI { use XML::Tags; ; @@ -49,7 +62,7 @@ use Test::More qw(no_plan); } sub globbery { - ; + ; } } @@ -74,6 +87,19 @@ is( ); is( + join('', HTML::Tags::to_html_string Foo::xquux), + '' . + '
x1
', + 'Conflicting HTML tags ok' +); + +is( + join('', XML::Tags::to_xml_string Foo::HTML_comment), + '', + 'HTML comment ok' +); + +is( join('', XML::Tags::to_xml_string Foo::fleem), '', 'Escaping ok' @@ -99,6 +125,6 @@ is( is( join(', ', Foo::globbery), - 't/globbery/one, t/globbery/two', + $globbery, 'real glob re-installed ok' );