3 REM Test by comparing stdout and stderr (FCBat style)
\r
5 if "%1"=="" cmd /K "%0" /wnd
\r
7 if exist T_ALL_result.txt del T_ALL_result.txt
\r
8 set TestTarget=..\..\PartCmp.vbs /S
\r
9 set return_exe=..\tools\return.exe
\r
14 ( cscript //nologo %TestTarget% left1.txt 1\* [start] 2>&1 ) > %T%_log.txt
\r
15 if not %errorlevel%==21 echo Fail in %T%.vbs>> T_ALL_result.txt& %return_exe% 1 & goto :last_of_test
\r
16 fc %T%_log.txt %T%_ans.txt
\r
17 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
21 ( cscript //nologo %TestTarget% left1.txt 2\* [start] 2>&1 ) > %T%_log.txt
\r
22 if not %errorlevel%==2 echo Fail in %T%.vbs>> T_ALL_result.txt& %return_exe% 1 & goto :last_of_test
\r
23 fc %T%_log.txt %T%_ans.txt
\r
24 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
28 ( cscript //nologo %TestTarget% left1.txt 3\* [start] 2>&1 ) > %T%_log.txt
\r
29 if not %errorlevel%==1 echo Fail in %T%.vbs>> T_ALL_result.txt& %return_exe% 1 & goto :last_of_test
\r
30 fc %T%_log.txt %T%_ans.txt
\r
31 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
35 if exist %T%_out_log.bat del %T%_out_log.bat
\r
36 ( cscript //nologo %TestTarget% /B:out=%T%_out_log.bat left1.txt 1\* [start] 2>&1 ) > %T%_log.txt
\r
37 if not %errorlevel%==21 echo Fail in %T%.vbs>> T_ALL_result.txt& %return_exe% 1 & goto :last_of_test
\r
38 fc %T%_log.txt %T%_ans.txt
\r
39 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
40 fc %T%_out_log.bat %T%_out_ans.bat
\r
41 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
45 if exist %T%_out_log.bat del %T%_out_log.bat
\r
46 ( cscript //nologo %TestTarget% /B:out=%T%_out_log.bat left1.txt 2\* [start] 2>&1 ) > %T%_log.txt
\r
47 if not %errorlevel%==2 echo Fail in %T%.vbs>> T_ALL_result.txt& %return_exe% 1 & goto :last_of_test
\r
48 fc %T%_log.txt %T%_ans.txt
\r
49 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
50 fc %T%_out_log.bat %T%_out_ans.bat
\r
51 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
55 if exist %T%_out_log.bat del %T%_out_log.bat
\r
56 ( cscript //nologo %TestTarget% /B:out=%T%_out_log.bat left1.txt 3\* [start] 2>&1 ) > %T%_log.txt
\r
57 if not %errorlevel%==1 echo Fail in %T%.vbs>> T_ALL_result.txt& %return_exe% 1 & goto :last_of_test
\r
58 fc %T%_log.txt %T%_ans.txt
\r
59 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
60 fc %T%_out_log.bat %T%_out_ans.bat
\r
61 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
69 echo Test log compare ...>> T_ALL_result.txt
\r
70 if not errorlevel 1 echo Pass.>> T_ALL_result.txt
\r
71 if errorlevel 1 echo Fail.>> T_ALL_result.txt
\r
72 type T_ALL_result.txt
\r