diff options
author | Nathan Gass | 2012-08-08 16:45:23 +0000 |
---|---|---|
committer | Nathan Gass | 2012-08-08 16:45:23 +0000 |
commit | 63905bb0a9c91e6ff61bcc5896246ec9a8d632bc (patch) | |
tree | 1e85e203c7663bd1c5b44bc816bfbb91f30ef756 /tests/it_html.t | |
parent | 362fc6c961f7dcb658c9393acd293f203f190f53 (diff) | |
download | itools-63905bb0a9c91e6ff61bcc5896246ec9a8d632bc.tar.gz itools-63905bb0a9c91e6ff61bcc5896246ec9a8d632bc.tar.bz2 itools-63905bb0a9c91e6ff61bcc5896246ec9a8d632bc.zip |
some more special char tests (normal utf8 chars, \xc2 at end, null bytes)
Diffstat (limited to 'tests/it_html.t')
-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", |