add some more HTML4 to HTML5 test files

This commit is contained in:
Geoff McLane 2014-08-08 17:50:12 +02:00
parent 5e718329b3
commit 8ec8fd9302
28 changed files with 1769 additions and 1 deletions

View file

@ -1,6 +1,9 @@
README.html4.txt - 20140805 README.html4.txt - 20140805
This folder contains about dozen HTML files, each using a tag or tags REMOVED from HTML5 ## Tests 1
This folder contains about dozen HTML files, each using a tag or tags REMOVED from HTML5,
all named *4.html
Running these files through standard 2009 tidy should mostly produce no errors or warnings. Running these files through standard 2009 tidy should mostly produce no errors or warnings.
@ -21,6 +24,33 @@ and a FAILURE if a clean run.
There is also a cleanup.bat to delete the products produced by this test. There is also a cleanup.bat to delete the products produced by this test.
## Tests 2
This folder contains about 14 HTML files, each using a tag or tags REMOVED from HTML5,
all named *5.html
These were use to test an develop the CheckHTML5(doc,node) service. And there are
a set of batch file to run these tests, named test*.bat, and some 'special'
batch file like -
setexe.bat - This is called by all others to set the location of the EXE to use. This
file will need to be ADJUST to point to where the Tidy EXE that you want to use.
testone.bat - After setting the input file, each test????.bat calls this to conduct
four (4) tests -
Using configure DOCTYPE AND CLEAN
Using configure DOCTYPE but NO CLEAN
Using configure CLEAN but NO DOCTYPE
Using configure NO CLEAN and NO DOCTYPE
All the output is redirected to tempinfo.html
The set of test batch files is -
testacro.bat testbig.bat testbody.bat testcent.bat testcent2.bat testdir.bat testfont.bat
testi2.bat testtt.bat
THe name generally indicates the tag or attribute being tested...
Enjoy. Enjoy.
# eof # eof

View file

@ -0,0 +1,23 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>
acronym
</title>
<style>
strong { color: red }
</style>
</head>
<body>
<p>An acronym for the World Wide Web is <strong>
<acronym title="World Wide Web">WWW</acronym></strong>
</p>
<p>This file contains <strong>&lt;acronym title=&quot;World Widw Web&quot;&gt;WWW&lt;/acronym&gt;</strong>
</p>
<p>The 'experimental' Nu Markup Checker flags this as an <strong>ERROR</strong> with the string <strong>
&quot;Error: The acronym element is obsolete. Use the abbr element instead.&quot;</strong>
</p>
</body>
</html>

View file

@ -0,0 +1,61 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
align5.html - align attribute to css
</title>
<style>
strong { color: red }
</style>
</head>
<body>
<h1 align="center">Using align=&quot;center&quot;</h1>
<p>This file contains an element <strong>&lt;h1 align=&quot;center&quot;&gt;</strong>, but it also applies
to any element, like &lt;p..., &lt;table, etc...
</p>
<p>The 'experimental' Nu Markup Checker flags this as an <strong>HTML5 ERROR</strong> with the string <strong>
&quot;Error: The align attribute on the h1 element is obsolete. Use CSS instead.&quot;</strong>
</p>
<p>If 'clean' at present tidy 'silently' replaces this with CSS in TY_(CleanDocument)(doc),
in Style2Rule( TidyDocImpl* doc, Node *node), using TY_(AttrGetById)(node, TidyAttr_STYLE);
</p>
<p>Q: <strong>Should this behaviour be modified?</strong>
</p>
<p>A: There are various possibilities<br>
<ul>
<li>If the document is configured (or found?) to be HTML5, then
<ul>
<li>If clean configured
<ul>
<li>Fix it silently, <strong>as now</strong>
<li>Fix it with a warning
<li>No fix and flag as an error, like the validator
</ul>
<li>Clean not configured
<ul>
<li>No fix, with no warning or error, <strong>as now</strong>
<li>Fix it with a warning
<li>No fix and flag as an error, like the validator
</ul>
</ul>
<li>Else if NOT configured (or found?) to be HTML5
<ul>
<li>If clean configured
<ul>
<li>Fix it silently, <strong>as now</strong>
<li>Fix it with a warning
</ul>
<li>Clean not configured
<ul>
<li>Flag as a warning
<li>Flag as an error
<li>No warning or error, <strong>as now</strong>
</ul>
</ul>
</ul>
</body>
</html>

View file

@ -0,0 +1,17 @@
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>
applet
</title>
</head>
<body>
<p>An applet tag is not supported in HTML5</p>
<applet code="Bubbles.class" width="350" height="350">
Java applet that draws animated bubbles.
</applet>
</body>
</html>

View file

@ -0,0 +1,23 @@
<!DOCTYPE HTML>
<html>
<head>
<title>basefont</title>
<meta charset="utf-8">
<style>
.bf { color: #0000FF; font-size: 80%; font-family: verdana, sans-seif; }
</style>
</head>
<body>
<p>This line of text is before the basefont tag.</p>
<basefont size="4" color="#FF0000" face="Courier New, Courier, monospace">
<p>This is the first line of text after the basefont tag.</p>
<p>This is the second line of text after the basefont tag.</p>
<p class="bf"><strong>Note:</strong> The basefont tag is not supported by most browsers. This line uses an alternative CSS
which could be associated to the body to effect the whole document.
</p>
</body>
</html>

View file

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
big tag
</title>
<style>
.big { font-size: larger }
</style>
</head>
<body>
<p>Normal text, then some <big>&lt;big&gt; bigger text</big></p>
<p>Similar text, using span <span class="big"> bigger text</span></p>
</body>
</html>

View file

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
blink tag
</title>
<style>
.blk { text-decoration: blink; }
</style>
</head>
<body>
<p>Normal text, then some <blink>blink</blink></p>
<p>Similar text, using span <span class="blk">blink</span></p>
</body>
</html>

View file

@ -0,0 +1,58 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
bodyatts5.html - body attribute to css
</title>
<style>
strong { color: red }
</style>
</head>
<body background="images/non-existing.jpg">
<p>This file contains a body element <strong>&lt;body background=&quot;images/non-existing.jpg&quot;&gt;</strong>
</p>
<p>The 'experimental' Markup Validation Service flags this as an HTML5 <strong>ERROR</strong> with the string <strong>
&quot;The background attribute on the body element is obsolete. Use CSS instead.&quot;</strong>
</p>
<p>If 'clean' at present tidy 'silently' replaces this with CSS in CleanBodyAttrs( TidyDocImpl* doc, Node* body ),
called from CreateStyleElement( doc ), in void TY_(CleanDocument)( TidyDocImpl* doc )
</p>
<p>Q: <strong>Should this behaviour be modified?</strong>
</p>
<p>A: There are various possibilities<br>
<ul>
<li>If the document is configured (or found?) to be HTML5, then
<ul>
<li>If clean configured
<ul>
<li>Fix it silently, <strong>as now</strong>
<li>Fix it with a warning
<li>No fix and flag as an error, like the validator
</ul>
<li>Clean not configured
<ul>
<li>No fix, with no warning or error, <strong>as now</strong>
<li>Fix it with a warning
<li>No fix and flag as an error, like the validator
</ul>
</ul>
<li>If NOT configured (or found?) to be HTML5
<ul>
<li>If clean configured
<ul>
<li>Fix it silently, <strong>as now</strong>
<li>Fix it with a warning
</ul>
<li>Clean not configured
<ul>
<li>Flag as a warning
<li>Flag as an error
<li>No warning or error, <strong>as now</strong>
</ul>
</ul>
</ul>
</body>
</html>

View file

@ -0,0 +1,70 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
center25.html - center tag on table
</title>
<style>
strong { color: red }
</style>
</head>
<body>
<center>
<table>
<tr><td>Table centered by &lt;center&gt;</td></tr>
</table>
</center>
<p>This file contains <strong>&lt;center;&gt; ... &lt;/center;&gt;</strong>
</p>
<p>The 'experimental' Nu Markup Checker flags this as an <strong>HTML5 ERROR</strong> with the string <strong>
&quot;Error: The center element is obsolete. Use CSS instead.&quot;</strong>
</p>
<p>If 'clean' at present tidy 'silently' replaces this with a &lt;div class=&quot;c1&quot;&gt;, and
add the CSS in TY_(CleanDocument)(doc), ...
</p>
<p>Q: <strong>Should this behaviour be modified?</strong>
</p>
<p>A: There are various possibilities<br>
<ul>
<li>If the document is configured (or found?) to be HTML5, then
<ul>
<li>If clean configured
<ul>
<li>Fix it silently, <strong>as now</strong>
<li>Fix it with a warning
<li>No fix and flag as an error, like the validator
</ul>
<li>Clean not configured
<ul>
<li>No fix, with no warning or error, <strong>as now</strong>
<li>Fix it with a warning
<li>No fix and flag as an error, like the validator
</ul>
</ul>
<li>Else if NOT configured (or found?) to be HTML5
<ul>
<li>If clean configured
<ul>
<li>Fix it silently, <strong>as now</strong>
<li>Fix it with a warning
</ul>
<li>Clean not configured
<ul>
<li>Flag as a warning
<li>Flag as an error
<li>No warning or error, <strong>as now</strong>
</ul>
</ul>
</ul>
<p>Also perhaps Tidy5 needs another configuration parameter as suggested by the validator.w3.org,
namely <strong>&quot;HTML4-specific tokenization errors are enabled.&quot;</strong> That is being
able to clearly inform tidy that is the document is to be taken as HTML5, then certain
tags are to be an error.
</p>
</body>
</html>

View file

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
center tag
</title>
<style>
p.ctr { text-align: center; }
</style>
</head>
<body>
<center>
<p>This text will be center-aligned.</p>
</center>
<p>Nomal left text</p>
<p class="ctr">Center aligned by CSS</p>
</body>
</html>

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
dir tag
</title>
</head>
<body>
<p>dir tag for a list...</p>
<dir>
<li>html</li>
<li>xhtml</li>
<li>css</li>
</dir>
</body>
</html>

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<title>font tag</title>
</head>
<body>
<p><font size="3" color="red">Some text, size=3, color=red!</font></p>
<p><font size="2" color="blue">Some text, size=2, color=blue!</font></p>
<p><font face="verdana" color="green">Some text, face=verdana, color=green!</font></p>
<p><strong>Note:</strong> The font element is not supported in HTML5. Use CSS instead.</p>
</body>
</html>

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
frameset, frame, noframes tags
</title>
</head>
<frameset cols="25%,*,25%">
<frame src="frame_a.htm">
<frame src="frame_b.htm">
<frame src="frame_c.htm">
</frameset>
<noframes>
<p>frameset, frame not supported</p>
</noframes>
</html>

View file

@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf8">
<title>
Geoff McLane Wanadoo Home Page
</title>
<script language="JavaScript">
<!-- Begin
// window.location = "http://geoffmclane.com";
// End -->
</script>
</head>
<body background="images/cldsg.jpg">
<h1 align="center">
Geoff McLane Wanadoo Home Page
</h1>
<h2 align="center">
<a href="http://geoffmclane.com">Go To Geoff McLane Home Page</a>
</h2>
<p align="center">
To go to my main site, click on the above link, or the image below!
</p>
<center>
<table>
<tr>
<td>
<a href="http://geoffmclane.com"><img src="images/geoff021204.jpg"
alt="image of me"></a>
</td>
</tr>
</table>
</center>
<p>
<a target="_blank"
href="https://github.com/geoffmcl/tidy-fork/"><img border="0"
src="images/checked_by_tidy.gif"
alt="checked by tidy"
width="32"
height="32"></a>&nbsp; <a href="http://validator.w3.org/check?uri=referer"
target="_blank"><img src="images/valid-html5.jpg"
alt="Valid HTML 5"
width="88"
height="31"></a>
</p>
<!-- Orange - 20140807 - test html5 -->
<!-- Orange - 20140806 - minor update -->
<!-- Wanadoo - 2005.10.08 11:30 -->
<!-- Wanadoo - 2005.10.06 2:21 -->
</body>
</html>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,20 @@
@REM ##############################################################
@REM ### To be adjusted to suit your location of the EXE to use ###
@REM ##############################################################
@set TMPEXE=C:\Projects\tidy\tidy-fork\build\win64\Release\tidy5.exe
@REM set TMPEXE=C:\MDOS\tidygh.exe
@REM set TMPEXE=C:\MDOS\tidy5.exe
@if NOT EXIST %TMPEXE% (
:RPT
@echo Can NOT locate EXE %TMPEXE%!
@echo *** FIX ME %0 *** to point to the EXE to use...
@echo Use Ctrl+C to abort
@pause
@goto RPT
)
@set TMPINFO=tempinfo.html
@set TMPSHOW=
@REM set TMPSHOW=--show-info no

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>strike tag</title>
<style>
.stk { text-decoration: line-through; }
</style>
</head>
<body>
<p>Version 2.0 is <strike>not yet available!</strike> now available!</p>
<p>The strike element is not supported in HTML5. Use CSS instead.</p>
<p>Version 2.0 is <span class="stk">not yet available!</span> now available!</p>
</body>
</html>

View file

@ -0,0 +1,13 @@
@setlocal
@call setexe
@set TMPFIL=C:\HOMEPAGE\Orange\acronym5.html
@if NOT EXIST %TMPFIL% (
@echo Unable to locate FILE %TMPFIL%
@exit /b 1
)
@REM %TMPEXE% -c -i --doctype html5 -o temptidy5.html --tidy-mark no --show-info no %TMPFIL%
@call testone
@echo See %TMPINFO%

View file

@ -0,0 +1,14 @@
@setlocal
@call setexe
@set TMPFIL=C:\HOMEPAGE\Orange\big5.html
@if NOT EXIST %TMPFIL% (
@echo Unable to locate FILE %TMPFIL%
@exit /b 1
)
@REM %TMPEXE% -c -i --doctype html5 -o temptidy5.html --tidy-mark no --show-info no %TMPFIL%
@call testone
@echo See %TMPINFO%

View file

@ -0,0 +1,16 @@
@setlocal
@call setexe
@set TMPFIL=C:\HOMEPAGE\Orange\bodyatts5.html
@if NOT EXIST %TMPEXE% (
@echo Unable to locate EXE %TMPEXE%
@exit /b 1
)
@if NOT EXIST %TMPFIL% (
@echo Can NOT locate %TMPFIL%! *** FIX ME ***
@exit /b 1
)
@call testone
@echo see %TMPINFO%

View file

@ -0,0 +1,14 @@
@setlocal
@call setexe
@set TMPFIL=C:\HOMEPAGE\Orange\center5.html
@if NOT EXIST %TMPFIL% (
@echo Unable to locate FILE %TMPFIL%
@exit /b 1
)
@REM %TMPEXE% -i --doctype html5 -o temptidy5.html --tidy-mark no --show-info no %TMPFIL%
@call testone
@echo See %TMPINFO%

View file

@ -0,0 +1,14 @@
@setlocal
@call setexe
@set TMPFIL=C:\HOMEPAGE\Orange\center25.html
@if NOT EXIST %TMPFIL% (
@echo Unable to locate FILE %TMPFIL%
@exit /b 1
)
@REM %TMPEXE% -i --doctype html5 -o temptidy5.html --tidy-mark no --show-info no %TMPFIL%
@call testone
@echo See %TMPINFO%

View file

@ -0,0 +1,14 @@
@setlocal
@call setexe
@set TMPFIL=C:\HOMEPAGE\Orange\dir5.html
@if NOT EXIST %TMPFIL% (
@echo Unable to locate FILE %TMPFIL%
@exit /b 1
)
@REM %TMPEXE% -c -i --doctype html5 -o temptidy5.html --tidy-mark no --show-info no %TMPFIL%
@REM %TMPEXE% -i --doctype html5 -o temptidy5.html --tidy-mark no --show-info no %TMPFIL%
@call testone
@echo See %TMPINFO%

View file

@ -0,0 +1,12 @@
@setlocal
@call setexe
@set TMPFIL=C:\HOMEPAGE\Orange\font5.html
@if NOT EXIST %TMPFIL% (
@echo Unable to locate FILE %TMPFIL%
@exit /b 1
)
@call testone
@echo See %TMPINFO%

View file

@ -0,0 +1,8 @@
@setlocal
@call setexe
@set TMPFIL=C:\HOMEPAGE\Orange\index2.html
@call testone
@REM tidy5 -c -i --doctype html5 -o temptidy5.html --tidy-mark no index2.html

View file

@ -0,0 +1,51 @@
@if NOT EXIST %TMPEXE% goto NOEXE
@if NOT EXIST %TMPFIL% goto NOFIL
@echo Tests on %TMPFIL% using %TMPEXE%, output to %TMPINFO%
@echo Tests on %TMPFIL% using %TMPEXE% > %TMPINFO%
@echo ================================================ >> %TMPINFO%
@echo Using configure DOCTYPE AND CLEAN >> %TMPINFO%
@echo ================================================ >> %TMPINFO%
@echo Doing: -c -i --doctype html5 -o temp1c.html --tidy-mark no %TMPSHOW% %TMPFIL% >> %TMPINFO%
@%TMPEXE% -c -i --doctype html5 -o temp1c.html --tidy-mark no %TMPSHOW% %TMPFIL% >> %TMPINFO% 2>&1
@type temp1c.html >> %TMPINFO%
@echo ================================================ >> %TMPINFO%
@echo Using configure DOCTYPE but NO CLEAN >> %TMPINFO%
@echo ================================================ >> %TMPINFO%
@echo Doing: -i --doctype html5 -o temp1nc.html --tidy-mark no %TMPSHOW% %TMPFIL% >> %TMPINFO%
@%TMPEXE% -i --doctype html5 -o temp1nc.html --tidy-mark no %TMPSHOW% %TMPFIL% >> %TMPINFO% 2>&1
@type temp1nc.html >> %TMPINFO%
@echo ================================================ >> %TMPINFO%
@echo Using configure CLEAN but NO DOCTYPE >> %TMPINFO%
@echo ================================================ >> %TMPINFO%
@echo Doing: -c -i -o temp1cndt.html --tidy-mark no %TMPSHOW% %TMPFIL% >> %TMPINFO%
@%TMPEXE% -c -i -o temp1cndt.html --tidy-mark no %TMPSHOW% %TMPFIL% >> %TMPINFO% 2>&1
@type temp1cndt.html >> %TMPINFO%
@echo ================================================ >> %TMPINFO%
@echo Using configure NO CLEAN and NO DOCTYPE >> %TMPINFO%
@echo ================================================ >> %TMPINFO%
@echo Doing: -i -o temp1ncndt.html --tidy-mark no %TMPSHOW% %TMPFIL% >> %TMPINFO%
@%TMPEXE% -i -o temp1ncndt.html --tidy-mark no %TMPSHOW% %TMPFIL% >> %TMPINFO% 2>&1
@type temp1ncndt.html >> %TMPINFO%
@REM call ff -d -n %TMPINFo% -o-tempinf2.html
@goto END
:NOEXE
@echo Error: Can NOT locate the EXE '%TMPEXE%' *** Fix setexe.bat accordingly
@goto FAILED
:NOFIL
@echo Error: Can NOT locate the input file '%TMPFIL%' *** Fix test*.bat accordingly
@goto FAILED
:FAILED
@echo Use Ctrl+C to abort and fix this situation
@pause
@goto FAILED
:END
@REM eof

View file

@ -0,0 +1,13 @@
@setlocal
@call setexe
@set TMPFIL=C:\HOMEPAGE\Orange\tt5.html
@if NOT EXIST %TMPFIL% (
@echo Unable to locate FILE %TMPFIL%
@exit /b 1
)
@call testone
@REM %TMPEXE% -c -i --doctype html5 -o tempclean.html --tidy-mark no --show-info no %TMPFIL%
@REM %TMPEXE% -i --doctype html5 -o tempnoclean.html --tidy-mark no --show-info no %TMPFIL%
@echo See %TMPINFO%

17
test/html5/html4/tt5.html Normal file
View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>tt tag</title>
</head>
<body>
<p>This text is normal.</p>
<p><tt>This text is teletype text.</tt></p>
<p><strong>Note:</strong> The tt element is not supported in HTML5.</p>
<p style="font-family:'Lucida Console', monospace; size=2;">Similar effect using css</p>
</body>
</html>