add cmd file to test one html file

This commit is contained in:
Geoff McLane 2014-11-27 16:41:42 +01:00
parent 0f04eaa7d6
commit e026b8ff3c

41
test/html5/testone.cmd Normal file
View file

@ -0,0 +1,41 @@
@setlocal
@set TMPEXE=..\..\build\cmake\Release\tidy5.exe
@if NOT EXIST %TMPEXE% goto NOEXE
@set TMPINP=temphtml5.cfg
@if NOT EXIST %TMPINP% goto NOINP
@set TMPDIR=tempout
@if NOT EXIST %TMPDIR%\nul goto NODIR
@if "%~1x" == "x" goto HELP
@if NOT EXIST %1 goto NOFIL
@set TMPOUT=%TMPDIR%\%~nx1
@%TMPEXE% -config %TMPINP% -o %TMPOUT% %1
@if ERRORLEVEL 1 goto FAILED
@echo Output to %TMPOUT%
@goto END
:FAILED
@echo The test of %1 FAILED!
@echo Output to %TMPOUT%
@pause
@goto END
:NOEXE
@echo Can NOT locate EXE %TMPEXE%! *** FIX ME ***
@goto END
:NOINP
@echo Can NOT locate config %TMPINP%! *** FIX ME ***
@goto END
:NODIR
@echo Can NOT locate output directory %TMPDIR%! *** FIX ME ***
@goto END
:NOFIL
@echo Can NOT locate input file %1
:HELP
@echo Give the name of a HTML5 file to tidy
:END