diff options
-rwxr-xr-x | tests/it_html.t | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/it_html.t b/tests/it_html.t index 2838ae1..2ed151c 100755 --- a/tests/it_html.t +++ b/tests/it_html.t @@ -1,6 +1,8 @@ #!/www/server/bin/php -qC <?php +it::getopt(""); #handle possible --debug parameter + # Tests for html.class # Traditional html generation @@ -56,6 +58,25 @@ is( ); is( + div('arg' => "abc äüö éá© œàè îôÇ xyz", "abc äüö éá© œàè îôÇ xyz"), + "<div arg=\"abc äüö éá© œàè îôÇ xyz\">abc äüö éá© œàè îôÇ xyz</div>\n", + "leave legal utf8 intact", +); + +unset($GLOBALS['debug_utf8check']); +is( + div('arg' => "value \xc2", "content"), + "<div arg=\"value \xc2\">content</div>\n", + "handle single \\xc2 at end of attribute value", +); + +is( + div("arg\x00end" => "value \x00 end", "content \x00 content end"), + "<div arg\x00end=\"value end\">content \x00 content end</div>\n", + "handle 0-bytes", +); + +is( div('arg' => "& \" < > \n '", "& \" < > \n '"), "<div arg=\"& " < > '\">& \" < > \n '</div>\n", "use html entities in attributes but not in normal text", |