summaryrefslogtreecommitdiff
path: root/tests/it_html.t
diff options
context:
space:
mode:
authorNathan Gass2012-08-07 11:43:21 +0000
committerNathan Gass2012-08-07 11:43:21 +0000
commitb28247c0dce9108a499d9c038d633a135503f76a (patch)
tree9ddbadd3a52de9accad487d4f6ed29b39c44ed0a /tests/it_html.t
parent9439a26498ab3b2978ba6b889684fadfa82368e8 (diff)
downloaditools-b28247c0dce9108a499d9c038d633a135503f76a.tar.gz
itools-b28247c0dce9108a499d9c038d633a135503f76a.tar.bz2
itools-b28247c0dce9108a499d9c038d633a135503f76a.zip
some tests for proper _cleanup with it_html tag functions
Diffstat (limited to 'tests/it_html.t')
-rwxr-xr-xtests/it_html.t12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/it_html.t b/tests/it_html.t
index 7e43faa..2d99cf3 100755
--- a/tests/it_html.t
+++ b/tests/it_html.t
@@ -49,6 +49,18 @@ is(
"select tag without multiselect"
);
+is(
+ div('arg' => "val: \x03, \x0e, \x0f, \x0c, \xc2\x80, \xc2\x9f, \x09, \n", "\x02, \x0e, \x0f, \x0c, \xc2\x80, \xc2\x9f, \x09, \n"),
+ "<div arg=\"val: , , , , , , \x09, &#10;\">\x02, \x0e, \x0f, \x0c, \xc2\x80, \xc2\x9f, \x09, \n</div>\n",
+ "blank unprintable characters and illegal utf8 in attributes but not in normal text"
+);
+
+is(
+ div('arg' => "& \" < > \n '", "& \" < > \n '"),
+ "<div arg=\"&amp; &quot; &lt; &gt; &#10; '\">& \" < > \n '</div>\n",
+ "use html entities in attributes but not in normal text",
+);
+
# XML generation
unset($GLOBALS['it_html']);
new it_html(array('htmltype' => "xhtml", 'tags' => "xmltest"));