Added test cases for this PR.

This commit is contained in:
Jim Derry 2021-06-30 10:16:10 -04:00
parent bee0bf738a
commit 4052718fb8
7 changed files with 111 additions and 0 deletions

View File

@ -0,0 +1,2 @@
# Sample config for 729a.
strict-tags-attributes: yes

View File

@ -0,0 +1,25 @@
<!--
This test case represents HTML Tidy issue #729, which describes
how Tidy misbehaves when strict-tags-attributes is set to `no`,
wherein Tidy complains but shouldn't.
Version a of this test shows proper behavior when set to `yes`.
Version b of this test shows proper behavior when set to `no`.
-->
<!DOCTYPE html>
<html>
<head>
<title> Alignment </title>
</head>
<body>
<table>
<tr valign="bottom">
<td width="50" align="center">
text
</td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,2 @@
# Sample config for 729b.
strict-tags-attributes: no

View File

@ -0,0 +1,25 @@
<!--
This test case represents HTML Tidy issue #729, which describes
how Tidy misbehaves when strict-tags-attributes is set to `no`,
wherein Tidy complains but shouldn't.
Version a of this test shows proper behavior when set to `yes`.
Version b of this test shows proper behavior when set to `no`.
-->
<!DOCTYPE html>
<html>
<head>
<title> Alignment </title>
</head>
<body>
<table>
<tr valign="bottom">
<td width="50" align="center">
text
</td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,19 @@
line 17 column 13 - Error: <tr> attribute "valign" not allowed for HTML5
line 18 column 17 - Error: <td> attribute "width" not allowed for HTML5
line 18 column 17 - Error: <td> attribute "align" not allowed for HTML5
Info: Document content looks like HTML5
Tidy found 0 warnings and 3 errors!
This document has errors that must be fixed before
using HTML Tidy to generate a tidied up version.
About HTML Tidy: https://github.com/htacg/tidy-html5
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
Official mailing list: https://lists.w3.org/Archives/Public/public-htacg/
Latest HTML specification: http://dev.w3.org/html5/spec-author-view/
Validate your HTML documents: http://validator.w3.org/nu/
Lobby your company to join the W3C: http://www.w3.org/Consortium
Do you speak a language other than English, or a different variant of
English? Consider helping us to localize HTML Tidy. For details please see
https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md

View File

@ -0,0 +1,21 @@
<!--
This test case represents HTML Tidy issue #729, which describes
how Tidy misbehaves when strict-tags-attributes is set to `no`,
wherein Tidy complains but shouldn't.
Version a of this test shows proper behavior when set to `yes`.
Version b of this test shows proper behavior when set to `no`.
-->
<!DOCTYPE html>
<html>
<head>
<title>Alignment</title>
</head>
<body>
<table>
<tr valign="bottom">
<td width="50" align="center">text</td>
</tr>
</table>
</body>
</html>

View File

@ -0,0 +1,17 @@
line 18 column 17 - Warning: <td> attribute "align" not allowed for HTML5
line 17 column 13 - Warning: <tr> attribute "valign" not allowed for HTML5
line 18 column 17 - Warning: <td> attribute "width" not allowed for HTML5
line 18 column 17 - Warning: <td> attribute "align" not allowed for HTML5
Info: Document content looks like HTML5
Tidy found 4 warnings and 0 errors!
About HTML Tidy: https://github.com/htacg/tidy-html5
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
Official mailing list: https://lists.w3.org/Archives/Public/public-htacg/
Latest HTML specification: http://dev.w3.org/html5/spec-author-view/
Validate your HTML documents: http://validator.w3.org/nu/
Lobby your company to join the W3C: http://www.w3.org/Consortium
Do you speak a language other than English, or a different variant of
English? Consider helping us to localize HTML Tidy. For details please see
https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md