From 930db3b36d87cd084e918f5cce6bc8f5760663ca Mon Sep 17 00:00:00 2001 From: Christian A. Weber Date: Mon, 23 Apr 2018 15:41:46 +0200 Subject: officially support htmltype => 'xml', don't short-close voidtags in xhtml mode --- tests/it_html.t | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'tests') 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' => "
", 'html' => "
", 'xhtml' => "
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(), + "\n", + "script may not be shortened (see xhtml spec)" +); + +is( + 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"), "foo\n", - "empty xmltest tag" + "non-empty xmltest tag" ); is( -- cgit v1.2.3