tidy-html5/test/acctest.cmd

56 lines
1.5 KiB
Batchfile
Raw Normal View History

2015-03-04 18:33:34 +00:00
@setlocal
@REM echo off
@REM execute all test cases of the accessibility test suite
2011-11-17 02:44:16 +00:00
@REM USER VARIABLES
@REM ##############
@REM set executable to be used
2015-03-04 18:33:34 +00:00
@set TIDY=..\build\cmake\Release\tidy5.exe
2011-11-17 02:44:16 +00:00
@REM set INPUT folder
@set TIDYINPUT=accessTest
@REM set OUTPUT folder
@set TIDYOUT=tmp
@REM set input test list file
@set TIDYIN=accesscases.txt
@REM ##############
@if NOT EXIST %TIDY% goto ERR1
@if NOT EXIST %TIDYINPUT%\cfg_default.txt goto ERR2
@if NOT EXIST %TIDYIN% goto ERR3
@REM Make sure output directory exists, or WARN of creation ...
@if EXIST %TIDYOUT%\nul goto RUNTEST
@echo NOTE: Folder %TIDYOUT% does not exist. It will be created ...
@echo Ctrl+C to abort ... any other keyin to continue ...
@pause
@md %TIDYOUT%
:RUNTEST
@echo Running ACCESS TEST suite > ACCERR.TXT
@echo Executable = %TIDY% >> ACCERR.TXT
@echo Input Folder = %TIDYINPUT% >> ACCERR.TXT
@echo Output Folder = %TIDYOUT% >> ACCERR.TXT
2015-03-04 18:33:34 +00:00
@set FAILEDACC=
@for /F "skip=1 tokens=1,2*" %%i in (%TIDYIN%) do call onetesta.cmd %%i %%j %%k
2011-11-17 02:44:16 +00:00
@if "%FAILEDACC%." == "." goto SUCCESS
2015-03-04 18:33:34 +00:00
@echo FAILED [%FAILEDACC%] ...
2011-11-17 02:44:16 +00:00
@goto END
:SUCCESS
@echo Appears ALL tests ran fine ...
@goto END
:ERR1
@echo ERROR: Unable to locate executable - [%TIDY%] - check name and location ...
@goto END
:ERR2
@echo ERROR: Unable to locate input folder - [%TIDYINPUT%]! - check name and location ...
@echo Specifically can not locate the file - [%TIDYINPUT%\cfg_default.txt] ...
@goto END
:ERR3
@echo ERROR: Can not locate file - [%TIDYIN%] - check name and location ...
@goto END
:END