summaryrefslogtreecommitdiff
path: root/tests/it_html.t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/it_html.t')
-rwxr-xr-xtests/it_html.t21
1 files changed, 19 insertions, 2 deletions
diff --git a/tests/it_html.t b/tests/it_html.t
index 0c419b8..bcfd40d 100755
--- a/tests/it_html.t
+++ b/tests/it_html.t
@@ -108,9 +108,26 @@ foreach (array('html5' => "<br flag>", 'html' => "<br flag>", 'xhtml' => "<br fl
is (trim(br(array('flag' => true))), $value, "Check empty tag and attribute for $type");
}
+# XHTML generation
+unset($GLOBALS['it_html']);
+new it_html(array('htmltype' => "xhtml", 'tags' => "script"));
+
+is(
+ script(),
+ "<script></script>\n",
+ "script may not be shortened (see xhtml spec)"
+);
+
+is(
+ h1(),
+ "<h1></h1>\n",
+ "empty h1 tag in xhtml context"
+);
+
+
# XML generation
unset($GLOBALS['it_html']);
-new it_html(array('htmltype' => "xhtml", 'tags' => "xmltest"));
+new it_html(array('htmltype' => "xml", 'tags' => "xmltest"));
is(
xmltest(),
@@ -121,7 +138,7 @@ is(
is(
xmltest("foo"),
"<xmltest>foo</xmltest>\n",
- "empty xmltest tag"
+ "non-empty xmltest tag"
);
is(