add a html4 removed tags test folder

This commit is contained in:
Geoff McLane 2014-08-05 13:11:09 +02:00
parent 4b371a4bc7
commit 1a3fda1c33
15 changed files with 315 additions and 0 deletions

View file

@ -0,0 +1,14 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>
acronym
</title>
</head>
<body>
<p>An acronym for the World Wide Web is <strong>
<acronym title="World Wide Web">WWW</acronym></strong>
</p>
</body>
</html>

View file

@ -0,0 +1,17 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>
applet
</title>
</head>
<body>
<p>An applet tag 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,25 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>HTML Test</title>
<meta http-equiv="Content-Type" content="text/html; 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,12 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>
big tag
</title>
</head>
<body>
<p>Normal text <big>Bigger text</big></p>
</body>
</html>

View file

@ -0,0 +1,15 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>
center tag
</title>
</head>
<body>
<center>
<p>This text will be center-aligned.</p>
</center>
<p>Nomal left text</p>
</body>
</html>

View file

@ -0,0 +1,23 @@
@setlocal
@set TMPCNT1=0
@if EXIST tempout (
@echo Cleaning and removing tempout folder...
@cd tempout
@del *.html >nul
@del *.txt >nul
@cd ..
@rd tempout
@set /A TMPCNT1+=1
)
@if EXIST temphtml4.cfg (
@echo Removing temphtml4.cfg file
@del temphtml4.cfg >nul
@set /A TMPCNT1+=1
)
@if "%TMPCNT1%x" == "0x" (
@echo Appears nothing to clean up!
)

View file

@ -0,0 +1,17 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<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 PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<head>
<title>font tag</title>
</head>
<html>
<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,6 @@
<html>
<body>
<h1>Frame A</h1>
<p>Note: The frameset, frame, and noframes elements are not supported in HTML5.</p>
</body>
</html>

View file

@ -0,0 +1,5 @@
<html>
<body>
<h1>Frame B</h1>
</body>
</html>

View file

@ -0,0 +1,5 @@
<html>
<body>
<h1>Frame C</h1>
</body>
</html>

View file

@ -0,0 +1,16 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<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>
frameset, frame not supported
</noframes>
</html>

View file

@ -0,0 +1,13 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>strike tag</title>
</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>
</body>
</html>

View file

@ -0,0 +1,114 @@
@setlocal
@set TMPEXE=..\..\..\build\cmake\Release\tidy5.exe
@if NOT EXIST %TMPEXE% goto NOEXE
@set TMPINP=temphtml4.cfg
@set TMPDIR=tempout
@%TMPEXE% -h > nul
@if ERRORLEVEL 1 goto NOEXE
@if EXIST %TMPDIR%\nul goto GOTOUT
@echo Will create the folder %TMPDIR% for output...
@pause
@md %TMPDIR%
@if ERRORLEVEL 1 goto NOOUT
@if NOT EXIST %TMPDIR%\nul goto NODIR
:GOTOUT
@REM This option would be nice, but at present it is FARRRR TOOOOO agressive,
@REM dropping <html>, <body>, etc... because they are marked CM_OPT
@REM which causes WARNINGS when tidy is run on the tidied file!!!
@REM echo omit-optional-tags: yes >> %TMPINP%
@if EXIST %TMPINP% goto GOTINP
@echo Creating a CONFIG file %TMPINP%
@pause
@echo wrap: 99 > %TMPINP%
@echo tidy-mark: no >> %TMPINP%
@echo indent: yes >> %TMPINP%
@echo break-before-br: yes >> %TMPINP%
@echo indent-attributes: yes >> %TMPINP%
@echo vertical-space: yes >> %TMPINP%
@echo indent-spaces: 1 >> %TMPINP%
@echo indent-cdata: no >> %TMPINP%
@echo wrap-asp: no >> %TMPINP%
@echo wrap-attributes: no >> %TMPINP%
@echo wrap-jste: no >> %TMPINP%
@echo wrap-php: no >> %TMPINP%
@echo wrap-script-literals: no >> %TMPINP%
@echo wrap-sections: no >> %TMPINP%
@echo tab-size: 4 >> %TMPINP%
@echo show-info: no >> %TMPINP%
@echo doctype: html5 >> %TMPINP%
@if NOT EXIST %TMPINP% goto NOINP
:GOTINP
@set TMPCNT1=0
@set TMPCNT2=0
@set TMPCNT3=0
@for %%i in (*4.html) do @(call :CNTIT %%i)
@echo.
@echo Will process %TMPCNT1% files found, using the config file %TMPINP%, which contains a directive doctype: html5,
@echo forcing tidy5 to assume they are HTML5 files. All output is to %TMPDIR% folder...
@echo.
@echo *** ALL *** should exit with WARNINGS and/or ERRORS, since they contain tags no longer used in HTML5
@echo.
@echo *** CONTINUE? *** Only Ctlr+C aborts... all other keys continue...
@echo.
@pause
@echo.
@for %%i in (*4.html) do @(call :DOONE %%i)
@echo.
@echo Done %TMPCNT2% files. See message and tidied output in the %TMPDIR% folder...
@echo.
@if "%TMPCNT3%x" == "0x" (
@echo ALL exited With WARNINGS and/or ERRORS! This is a *** SUCCESS ***
) ELSE (
@echo However have %TMPCNT3% with NO WARNINGS or ERRORS! This is a *** FAILURE ***
)
@echo.
@goto END
:CNTIT
@if "%~1x" == "x" goto :EOF
@set /A TMPCNT1+=1
@goto :EOF
:DOONE
@if "%~1x" == "x" goto :EOF
@set /A TMPCNT2+=1
@echo %TMPCNT2% of %TMPCNT1%: %1
@set TMPOUT=%TMPDIR%\%~nx1
@set TMPMSG=%TMPOUT%.txt
@if EXIST %TMPOUT% @del %TMPOUT% > nul
@if EXIST %TMPMSG% @del %TMPMSG% > nul
@%TMPEXE% -f %TMPMSG% -config %TMPINP% -o %TMPOUT% %1
@if ERRORLEVEL 1 goto :EOF
:FAILED
@echo The test of %1 FAILED!
@set /A TMPCNT3+=1
@pause
@goto :EOF
:NODIR
:NOOUT
@echo Error: Unable to create %TMPDIR%!
@goto END
:NOEXE
@echo Unable to find/run exe %TMPEXE%! *** FIX ME ***
@echo Set the name of the 'tidy' executable to use...
@goto END
:NOINP
@echo Error: Unable to create config file %TMPINP%!
@goto END
:END

16
test/html5/html4/tt4.html Normal file
View file

@ -0,0 +1,16 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<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>