OSDN Git Service

設定変更。
[wordring-tm/wordring-tm.git] / third_party / tidy-html5-master / test / alltest1.cmd
1 @setlocal
2 @echo off
3
4 REM alltest1.cmd - execute all test cases
5 REM
6 REM (c) 1998-2006 (W3C) MIT, ERCIM, Keio University
7 REM See tidy.c for the copyright notice.
8 REM
9 REM <URL:http://www.html-tidy.org/>
10 REM
11 REM    $Author: arnaud02 $
12 REM    $Date: 2006/12/28 10:01:44 $
13 REM    $Revision: 1.1 $
14
15 @if "%1." == "." goto USE
16 @if "%2." == "." goto USE
17
18 REM check for input file
19 @if NOT EXIST testcases.txt goto Err0
20 @if NOT EXIST onetest.cmd goto Err3
21 @if NOT EXIST input\nul goto Err4
22
23 REM set the runtime exe file
24 set TIDY=%1
25 @if NOT EXIST %TIDY% goto ERR1
26
27 REM set the OUTPUT folder
28 set TIDYOUT=%2
29 @if EXIST %TIDYOUT%\nul goto GOTDIR
30 @echo Folder '%TIDYOUT%' does not exist ... it will be created? ... Ctrl+C to EXIT!
31 @pause
32 @md %TIDYOUT%
33 @if NOT EXIST %TIDYOUT%\nul goto Err2
34 :GOTDIR
35 @set ERRTESTS=
36 for /F "tokens=1*" %%i in (testcases.txt) do call onetest.cmd %%i %%j
37 @if "%ERRTESTS%." == "." goto END
38 @echo ERROR TESTS [%ERRTESTS%] ...
39 goto END
40
41 :ERR0
42 echo    ERROR: Can not locate 'testcases.txt' ... check name, and location ...
43 goto END
44 :ERR1
45 echo    ERROR: Can not locate %TIDY% ... check name, and location ...
46 goto END
47 :ERR2
48 echo    ERROR: Can not create %TIDYOUT% folder ... check name, and location ...
49 goto END
50 :ERR3
51 echo    ERROR: Can not locate 'onetest.cmd' ... check name, and location ...
52 goto END
53 :ERR4
54 echo    ERROR: Can not locate 'input' folder ... check name, and location ...
55 goto END
56
57 :USE
58 @echo   Usage of ALLTEST1.CMD .........................................
59 @echo   AllTest1 tidy.exe Out_Folder
60 @echo   tidy.exe - This is the Tidy.exe you want to use for the test.
61 @echo   Out_Folder  - This is the FOLDER where you want the results put.
62 @echo   This folder will be created if it does not already exist.
63 @echo   ==================================
64 @echo   ALLTEST1.CMD will run a battery of test files in the input folder
65 @echo   Each test name, has an expected result, given in testcases.txt
66 @echo   There will be a warning if any test file fails to give this result.
67 @echo   ==================================
68 @echo   But the main purpose is to compare the 'results' of two version of
69 @echo   any two Tidy runtime exe's. Thus after you have two sets of results,
70 @echo   in separate folders, the idea is to compare these two folders.
71 @echo   Any directory compare utility will do, or you can download, and use
72 @echo   a WIN32 port of GNU diff.exe from http://unxutils.sourceforge.net/
73 @echo   ................................................................
74 @goto END
75
76 :END