From c7fecb80537e499fd135736d3eaf121241a973cd Mon Sep 17 00:00:00 2001 From: Christian A. Weber Date: Tue, 17 Apr 2018 12:47:09 +0200 Subject: fix empty non-void tags in non-xhtml modes, remove redundant whitelist --- tests/it_html.t | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/it_html.t b/tests/it_html.t index e863339..0c419b8 100755 --- a/tests/it_html.t +++ b/tests/it_html.t @@ -5,7 +5,7 @@ it::getopt(""); #handle possible --debug parameter # Tests for html.class -# Traditional html generation +# Traditional html5 generation ini_set('default_charset', "utf-8"); new it_html(array('htmltype' => "html")); @@ -21,6 +21,18 @@ is( "empty div tag" ); +is( + h1(), + "
\n", + "empty h1 tag" +); + +is( + input(), + "", + "no closing tag for void elements" +); + is( img(array('src' => "foo.png", 'alt' => "ALT")), '', @@ -118,6 +130,18 @@ is( "xmltest tag with attributes" ); +is( + h1(), + "\n", + "empty h1 tag in xml context" +); + +is( + input(), + "", + "empty input tag in xml context" +); + # Inheriting and extending it_html class myhtml extends it_html { -- cgit v1.2.3