OSDN Git Service

Version 3.00
[vbslib/main.git] / _src / Test / tools / PartRep / test / T_PartRep2 / T_ALL_5_do_test.bat
1 @echo off \r
2 REM\r
3 REM  Test by comparing stdout and stderr (FCBat style)\r
4 REM\r
5 if "%1"=="" cmd /K "%0" /wnd\r
6 \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
10 \r
11 \r
12 set T=T_Basic1\r
13 echo ((( [%T%] )))\r
14 mkdir %T%_work\r
15 xcopy /E /Y /Q %T% %T%_work\r
16 \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
21 \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
28 \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
32 set rmdir_path=\r
33 \r
34 \r
35 mkdir %T%_work\r
36 xcopy /E /Y /Q %T% %T%_work\r
37 \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
42 \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
49 \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
53 set rmdir_path=\r
54 \r
55 \r
56 set T=T_Basic2\r
57 echo ((( [%T%] )))\r
58 mkdir %T%_work\r
59 xcopy /E /Y /Q %T% %T%_work\r
60 \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
65 \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
82 \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
86 set rmdir_path=\r
87 \r
88 \r
89 mkdir %T%_work\r
90 xcopy /E /Y /Q %T% %T%_work\r
91 \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
96 \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
113 \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
117 set rmdir_path=\r
118 \r
119 \r
120 \r
121 set T=T_Basic2s\r
122 echo ((( [%T%] )))\r
123 mkdir %T%_work\r
124 xcopy /E /Y /Q %T% %T%_work\r
125 \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
130 \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
147 \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
151 set rmdir_path=\r
152 \r
153 \r
154 mkdir %T%_work\r
155 xcopy /E /Y /Q %T% %T%_work\r
156 \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
161 \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
178 \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
182 set rmdir_path=\r
183 \r
184 \r
185 mkdir %T%_work\r
186 xcopy /E /Y /Q %T% %T%_work\r
187 \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
192 \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
209 \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
213 set rmdir_path=\r
214 \r
215 \r
216 mkdir %T%_work\r
217 xcopy /E /Y /Q %T% %T%_work\r
218 \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
223 \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
240 \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
244 set rmdir_path=\r
245 \r
246 \r
247 \r
248 \r
249 set T=T_Basic3\r
250 echo ((( [%T%] )))\r
251 mkdir %T%_work\r
252 xcopy /E /Y /Q %T% %T%_work\r
253 \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
258 \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
263 \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
267 set rmdir_path=\r
268 \r
269 \r
270 mkdir %T%_work\r
271 xcopy /E /Y /Q %T% %T%_work\r
272 \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
277 \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
282 \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
286 set rmdir_path=\r
287 \r
288 \r
289 \r
290 %return_exe% 0\r
291 \r
292 \r
293 :last_of_test\r
294 set T=\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
299 \r
300  \r