diff options
author | Christian A. Weber | 2018-04-17 12:47:09 +0200 |
---|---|---|
committer | Christian A. Weber | 2018-04-17 12:53:44 +0200 |
commit | c7fecb80537e499fd135736d3eaf121241a973cd (patch) | |
tree | 3aa1a08d37e98e7a5576f5cc7657feb0cba4a931 /tests | |
parent | 0254eecab7934f9b07d084465dd9b15c9927b40e (diff) | |
download | itools-c7fecb80537e499fd135736d3eaf121241a973cd.tar.gz itools-c7fecb80537e499fd135736d3eaf121241a973cd.tar.bz2 itools-c7fecb80537e499fd135736d3eaf121241a973cd.zip |
fix empty non-void tags in non-xhtml modes, remove redundant whitelist
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/it_html.t | 26 |
1 files changed, 25 insertions, 1 deletions
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")); @@ -22,6 +22,18 @@ is( ); is( + h1(), + "<h1></h1>\n", + "empty h1 tag" +); + +is( + input(), + "<input>", + "no closing tag for void elements" +); + +is( img(array('src' => "foo.png", 'alt' => "ALT")), '<img src="foo.png" alt="ALT">', "img tag with attributes" @@ -118,6 +130,18 @@ is( "xmltest tag with attributes" ); +is( + h1(), + "<h1 />\n", + "empty h1 tag in xml context" +); + +is( + input(), + "<input />", + "empty input tag in xml context" +); + # Inheriting and extending it_html class myhtml extends it_html { |