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=..\..\PartRep.vbs
\r
9 set return_exe=..\tools\return.exe
\r
15 xcopy /E /Y /Q %T% %T%_work
\r
17 ( cscript //nologo %TestTarget% from.txt to.txt %T%_work\* 2>&1 ) > %T%_log.txt
\r
18 if not %errorlevel%==21 echo Fail in %T%.vbs>> T_ALL_result.txt& %return_exe% 1 & goto :last_of_test
\r
19 fc %T%_log.txt %T%_ans.txt
\r
20 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
22 fc %T%_work\bin1.bin %T%\bin1.bin
\r
23 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
24 fc %T%_work\txt1.txt %T%\txt1.txt
\r
25 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
26 fc %T%_work\txt2.txt %T%\txt2.txt
\r
27 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
29 set rmdir_path=%T%_work
\r
30 if exist %rmdir_path% rmdir /S /Q %rmdir_path%
\r
31 if exist %rmdir_path% echo cannot delete %rmdir_path% & set r=1& goto :eof
\r
36 xcopy /E /Y /Q %T% %T%_work
\r
38 ( cscript //nologo %TestTarget% /G from.txt to.txt %T%_work\* 2>&1 ) > %T%_g_log.txt
\r
39 if not %errorlevel%==21 echo Fail in %T%.vbs>> T_ALL_result.txt& %return_exe% 1 & goto :last_of_test
\r
40 fc %T%_g_log.txt %T%_g_ans.txt
\r
41 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
43 fc %T%_work\bin1.bin %T%_ans\bin1.bin
\r
44 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
45 fc %T%_work\txt1.txt %T%_ans\txt1.txt
\r
46 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
47 fc %T%_work\txt2.txt %T%_ans\txt2.txt
\r
48 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
50 set rmdir_path=%T%_work
\r
51 if exist %rmdir_path% rmdir /S /Q %rmdir_path%
\r
52 if exist %rmdir_path% echo cannot delete %rmdir_path% & set r=1& goto :eof
\r
59 xcopy /E /Y /Q %T% %T%_work
\r
61 ( cscript //nologo %TestTarget% from.txt to.txt %T%_work\* 2>&1 ) > %T%_log.txt
\r
62 if not %errorlevel%==21 echo Fail in %T%.vbs>> T_ALL_result.txt& %return_exe% 1 & goto :last_of_test
\r
63 fc %T%_log.txt %T%_ans.txt
\r
64 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
66 fc %T%_work\bin1.bin %T%\bin1.bin
\r
67 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
68 fc %T%_work\txt1.txt %T%\txt1.txt
\r
69 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
70 fc %T%_work\txt2.txt %T%\txt2.txt
\r
71 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
72 fc %T%_work\txt3.txt %T%\txt3.txt
\r
73 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
74 fc %T%_work\txt4.txt %T%\txt4.txt
\r
75 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
76 fc %T%_work\sub\bin1.bin %T%\sub\bin1.bin
\r
77 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
78 fc %T%_work\sub\txt1.txt %T%\sub\txt1.txt
\r
79 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
80 fc %T%_work\sub\txt2.txt %T%\sub\txt2.txt
\r
81 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
83 set rmdir_path=%T%_work
\r
84 if exist %rmdir_path% rmdir /S /Q %rmdir_path%
\r
85 if exist %rmdir_path% echo cannot delete %rmdir_path% & set r=1& goto :eof
\r
90 xcopy /E /Y /Q %T% %T%_work
\r
92 ( cscript //nologo %TestTarget% /G from.txt to.txt %T%_work\* 2>&1 ) > %T%_g_log.txt
\r
93 if not %errorlevel%==21 echo Fail in %T%.vbs>> T_ALL_result.txt& %return_exe% 1 & goto :last_of_test
\r
94 fc %T%_g_log.txt %T%_g_ans.txt
\r
95 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
97 fc %T%_work\bin1.bin %T%_ans\bin1.bin
\r
98 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
99 fc %T%_work\txt1.txt %T%_ans\txt1.txt
\r
100 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
101 fc %T%_work\txt2.txt %T%_ans\txt2.txt
\r
102 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
103 fc %T%_work\txt3.txt %T%_ans\txt3.txt
\r
104 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
105 fc %T%_work\txt4.txt %T%_ans\txt4.txt
\r
106 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
107 fc %T%_work\sub\bin1.bin %T%_ans\sub\bin1.bin
\r
108 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
109 fc %T%_work\sub\txt1.txt %T%_ans\sub\txt1.txt
\r
110 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
111 fc %T%_work\sub\txt2.txt %T%_ans\sub\txt2.txt
\r
112 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
114 set rmdir_path=%T%_work
\r
115 if exist %rmdir_path% rmdir /S /Q %rmdir_path%
\r
116 if exist %rmdir_path% echo cannot delete %rmdir_path% & set r=1& goto :eof
\r
124 xcopy /E /Y /Q %T% %T%_work
\r
126 ( cscript //nologo %TestTarget% /S from.txt to.txt %T%_work\* 2>&1 ) > %T%_log.txt
\r
127 if not %errorlevel%==21 echo Fail in %T%.vbs>> T_ALL_result.txt& %return_exe% 1 & goto :last_of_test
\r
128 fc %T%_log.txt %T%_ans.txt
\r
129 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
131 fc %T%_work\bin1.bin %T%\bin1.bin
\r
132 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
133 fc %T%_work\txt1.txt %T%\txt1.txt
\r
134 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
135 fc %T%_work\txt2.txt %T%\txt2.txt
\r
136 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
137 fc %T%_work\txt3.txt %T%\txt3.txt
\r
138 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
139 fc %T%_work\txt4.txt %T%\txt4.txt
\r
140 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
141 fc %T%_work\sub\bin1.bin %T%\sub\bin1.bin
\r
142 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
143 fc %T%_work\sub\txt1.txt %T%\sub\txt1.txt
\r
144 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
145 fc %T%_work\sub\txt2.txt %T%\sub\txt2.txt
\r
146 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
148 set rmdir_path=%T%_work
\r
149 if exist %rmdir_path% rmdir /S /Q %rmdir_path%
\r
150 if exist %rmdir_path% echo cannot delete %rmdir_path% & set r=1& goto :eof
\r
155 xcopy /E /Y /Q %T% %T%_work
\r
157 ( cscript //nologo %TestTarget% /G /S from.txt to.txt %T%_work\* 2>&1 ) > %T%_g_log.txt
\r
158 if not %errorlevel%==21 echo Fail in %T%.vbs>> T_ALL_result.txt& %return_exe% 1 & goto :last_of_test
\r
159 fc %T%_g_log.txt %T%_g_ans.txt
\r
160 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
162 fc %T%_work\bin1.bin %T%_ans\bin1.bin
\r
163 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
164 fc %T%_work\txt1.txt %T%_ans\txt1.txt
\r
165 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
166 fc %T%_work\txt2.txt %T%_ans\txt2.txt
\r
167 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
168 fc %T%_work\txt3.txt %T%_ans\txt3.txt
\r
169 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
170 fc %T%_work\txt4.txt %T%_ans\txt4.txt
\r
171 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
172 fc %T%_work\sub\bin1.bin %T%_ans\sub\bin1.bin
\r
173 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
174 fc %T%_work\sub\txt1.txt %T%_ans\sub\txt1.txt
\r
175 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
176 fc %T%_work\sub\txt2.txt %T%_ans\sub\txt2.txt
\r
177 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
179 set rmdir_path=%T%_work
\r
180 if exist %rmdir_path% rmdir /S /Q %rmdir_path%
\r
181 if exist %rmdir_path% echo cannot delete %rmdir_path% & set r=1& goto :eof
\r
186 xcopy /E /Y /Q %T% %T%_work
\r
188 ( cscript //nologo %TestTarget% /S /E:T_Basic2s_work\sub from.txt to.txt %T%_work\* 2>&1 ) > %T%_e_log.txt
\r
189 if not %errorlevel%==21 echo Fail in %T%.vbs>> T_ALL_result.txt& %return_exe% 1 & goto :last_of_test
\r
190 fc %T%_e_log.txt %T%_e_ans.txt
\r
191 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
193 fc %T%_work\bin1.bin %T%\bin1.bin
\r
194 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
195 fc %T%_work\txt1.txt %T%\txt1.txt
\r
196 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
197 fc %T%_work\txt2.txt %T%\txt2.txt
\r
198 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
199 fc %T%_work\txt3.txt %T%\txt3.txt
\r
200 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
201 fc %T%_work\txt4.txt %T%\txt4.txt
\r
202 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
203 fc %T%_work\sub\bin1.bin %T%\sub\bin1.bin
\r
204 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
205 fc %T%_work\sub\txt1.txt %T%\sub\txt1.txt
\r
206 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
207 fc %T%_work\sub\txt2.txt %T%\sub\txt2.txt
\r
208 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
210 set rmdir_path=%T%_work
\r
211 if exist %rmdir_path% rmdir /S /Q %rmdir_path%
\r
212 if exist %rmdir_path% echo cannot delete %rmdir_path% & set r=1& goto :eof
\r
217 xcopy /E /Y /Q %T% %T%_work
\r
219 ( cscript //nologo %TestTarget% /G /S /E:T_Basic2s_work\sub from.txt to.txt %T%_work\* 2>&1 ) > %T%_e_g_log.txt
\r
220 if not %errorlevel%==21 echo Fail in %T%.vbs>> T_ALL_result.txt& %return_exe% 1 & goto :last_of_test
\r
221 fc %T%_e_g_log.txt %T%_e_g_ans.txt
\r
222 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
224 fc %T%_work\bin1.bin %T%_ans\bin1.bin
\r
225 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
226 fc %T%_work\txt1.txt %T%_ans\txt1.txt
\r
227 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
228 fc %T%_work\txt2.txt %T%_ans\txt2.txt
\r
229 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
230 fc %T%_work\txt3.txt %T%_ans\txt3.txt
\r
231 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
232 fc %T%_work\txt4.txt %T%_ans\txt4.txt
\r
233 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
234 fc %T%_work\sub\bin1.bin %T%\sub\bin1.bin
\r
235 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
236 fc %T%_work\sub\txt1.txt %T%\sub\txt1.txt
\r
237 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
238 fc %T%_work\sub\txt2.txt %T%\sub\txt2.txt
\r
239 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
241 set rmdir_path=%T%_work
\r
242 if exist %rmdir_path% rmdir /S /Q %rmdir_path%
\r
243 if exist %rmdir_path% echo cannot delete %rmdir_path% & set r=1& goto :eof
\r
252 xcopy /E /Y /Q %T% %T%_work
\r
254 ( cscript //nologo %TestTarget% from.txt to.txt %T%_work\* 2>&1 ) > %T%_log.txt
\r
255 if not %errorlevel%==21 echo Fail in %T%.vbs>> T_ALL_result.txt& %return_exe% 1 & goto :last_of_test
\r
256 fc %T%_log.txt %T%_ans.txt
\r
257 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
259 fc %T%_work\bin1.bin %T%\bin1.bin
\r
260 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
261 fc %T%_work\bin2.bin %T%\bin2.bin
\r
262 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
264 set rmdir_path=%T%_work
\r
265 if exist %rmdir_path% rmdir /S /Q %rmdir_path%
\r
266 if exist %rmdir_path% echo cannot delete %rmdir_path% & set r=1& goto :eof
\r
271 xcopy /E /Y /Q %T% %T%_work
\r
273 ( cscript //nologo %TestTarget% /G from.txt to.txt %T%_work\* 2>&1 ) > %T%_g_log.txt
\r
274 if not %errorlevel%==21 echo Fail in %T%.vbs>> T_ALL_result.txt& %return_exe% 1 & goto :last_of_test
\r
275 fc %T%_g_log.txt %T%_g_ans.txt
\r
276 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
278 fc %T%_work\bin1.bin %T%_ans\bin1.bin
\r
279 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
280 fc %T%_work\bin2.bin %T%_ans\bin2.bin
\r
281 if errorlevel 1 echo Fail in %T%.vbs>> T_ALL_result.txt&goto :last_of_test
\r
283 set rmdir_path=%T%_work
\r
284 if exist %rmdir_path% rmdir /S /Q %rmdir_path%
\r
285 if exist %rmdir_path% echo cannot delete %rmdir_path% & set r=1& goto :eof
\r
295 echo Test log compare ...>> T_ALL_result.txt
\r
296 if not errorlevel 1 echo Pass.>> T_ALL_result.txt
\r
297 if errorlevel 1 echo Fail.>> T_ALL_result.txt
\r
298 type T_ALL_result.txt
\r