mirror of
https://github.com/reactos/reactos.git
synced 2024-08-24 12:18:57 +00:00
134 lines
3 KiB
Plaintext
134 lines
3 KiB
Plaintext
------------ Testing FOR loop ------------
|
|
--- Multiple lines
|
|
A
|
|
B
|
|
C
|
|
--- Lines and spaces
|
|
D
|
|
E
|
|
F
|
|
--- Multiple lines and commas
|
|
G
|
|
H
|
|
I
|
|
--- Multiple lines and %I
|
|
%I
|
|
%I
|
|
%I
|
|
--- Multiple lines and %j
|
|
%j
|
|
%j
|
|
%j
|
|
--- FOR /F token parsing
|
|
|
|
|
|
|
|
?=_ @=` A=a B=b C=c D=d E=e F=f G=g H=h I=i J=j K=k L=l M=m N=n O=o P=p Q=q R=r S=s T=t U=u V=v W=w X=x Y=y Z=z [={ \=| ]=} ^= _= `=%` a=%a b=%b c=%c d=%d e=%e f=%f g=%g h=%h i=%i j=%j k=%k l=%l m=%m n=%n o=%o p=%p q=%q r=%r s=%s t=%t u=%u v=%v w=%w x=%x y=%y z=%z {=%{ |=%| }=%} ~=%~
|
|
|
|
?=_ @=` A=a B=b C=c D=d E=e F=f G=g H=h I=i J=j K=k L=l M=m N=n O=o P=p Q=q R=r S=s T=t U=u V=v W=w X=x Y=y Z=z [={ \=| ]=} ^= _= `= a= b= c= d= e= f= g= h= i= j= k= l= m= n= o= p= q= r= s= t= u= v= w= x= y= z= {= |= }=%} ~=%~
|
|
|
|
?=_ @=` A=a B=b C=c D=d E= F= G=%G H=%H I=%I J=%J K=%K L=%L M=%M N=%N O=%O P=%P Q=%Q R=%R S=%S T=%T U=%U V=%V W=%W X=%X Y=%Y Z=%Z [=%[ \=%\ ]=%] ^=%^ _=%_ `=%` a=%a b=%b c=%c d=%d e=%e f=%f g=%g h=%h i=%i j=%j k=%k l=%l m=%m n=%n o=%o p=%p q=%q r=%r s=%s t=%t u=%u v=%v w=%w x=%x y=%y z=%z {=%{ |=%| }=%} ~=%~
|
|
|
|
?=_ @=` A=a B=b C=c D=d E=e F=f G=g H=h I=i J=j K=k L=l M=m N=n O=o P=p Q=q R=r S=s t u v w x y z { | } ~ ? @ [ \ ] _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ ? @ [ \ ] T= U= V= W= X= Y= Z= [= \= ]= ^= _=%_ `=%` a=%a b=%b c=%c d=%d e=%e f=%f g=%g h=%h i=%i j=%j k=%k l=%l m=%m n=%n o=%o p=%p q=%q r=%r s=%s t=%t u=%u v=%v w=%w x=%x y=%y z=%z {=%{ |=%| }=%} ~=%~
|
|
|
|
?=_ @=` A=a B=b C=c D=d E=%E F=%F G=%G H=%H I=%I J=%J K=%K L=%L M=%M N=%N O=%O P=%P Q=%Q R=%R S=%S T=%T U=%U V=%V W=%W X=%X Y=%Y Z=%Z [=%[ \=%\ ]=%] ^=%^ _=%_ `=%` a=%a b=%b c=%c d=%d e=%e f=%f g=%g h=%h i=%i j=%j k=%k l=%l m=%m n=%n o=%o p=%p q=%q r=%r s=%s t=%t u=%u v=%v w=%w x=%x y=%y z=%z {=%{ |=%| }=%} ~=%~
|
|
|
|
?=_ @=` A=a B=b C=c D=d E=e F=f G=g H=h I=%I J=%J K=%K L=%L M=%M N=%N O=%O P=%P Q=%Q R=%R S=%S T=%T U=%U V=%V W=%W X=%X Y=%Y Z=%Z [=%[ \=%\ ]=%] ^=%^ _=%_ `=%` a=%a b=%b c=%c d=%d e=%e f=%f g=%g h=%h i=%i j=%j k=%k l=%l m=%m n=%n o=%o p=%p q=%q r=%r s=%s t=%t u=%u v=%v w=%w x=%x y=%y z=%z {=%{ |=%| }=%} ~=%~
|
|
|
|
---------- Testing AND operator ----------
|
|
TRUE AND condition
|
|
---------- Testing OR operator -----------
|
|
FALSE OR condition
|
|
---------- Testing CMD exit codes and errorlevels ----------
|
|
--- CMD /C Direct EXIT call
|
|
OK
|
|
OK
|
|
--- CMD /C Direct EXIT /B call
|
|
OK
|
|
OK
|
|
--- CMD /C Non-existing command
|
|
OK
|
|
OK
|
|
OK
|
|
OK
|
|
--- CMD /C RMDIR (no ERRORLEVEL set)
|
|
OK
|
|
OK
|
|
OK
|
|
OK
|
|
--- CMD /C DIR (sets ERRORLEVEL) - With failure
|
|
OK
|
|
OK
|
|
OK
|
|
OK
|
|
OK
|
|
OK
|
|
OK
|
|
OK
|
|
--- CMD /C DIR (sets ERRORLEVEL) - With success
|
|
OK
|
|
OK
|
|
OK
|
|
OK
|
|
OK
|
|
OK
|
|
--- CALL Batch Non-existing command
|
|
OK
|
|
OK
|
|
--- CALL Batch RMDIR (no ERRORLEVEL set)
|
|
OK
|
|
OK
|
|
--- CALL Batch RMDIR with || (sets ERRORLEVEL)
|
|
OK
|
|
OK
|
|
OK
|
|
OK
|
|
--- CALL Batch DIR (sets ERRORLEVEL) - With failure
|
|
OK
|
|
OK
|
|
OK
|
|
OK
|
|
OK
|
|
OK
|
|
OK
|
|
OK
|
|
--- CALL Batch DIR (sets ERRORLEVEL) - With success
|
|
OK
|
|
OK
|
|
OK
|
|
OK
|
|
OK
|
|
OK
|
|
OK
|
|
OK
|
|
---------- Testing ERRORLEVEL in .BAT and .CMD ----------
|
|
--- In .BAT file
|
|
0
|
|
1
|
|
2
|
|
2
|
|
2
|
|
2
|
|
2
|
|
2
|
|
2
|
|
1
|
|
1
|
|
1
|
|
1
|
|
--- In .CMD file
|
|
0
|
|
1
|
|
2
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
0
|
|
1
|
|
0
|
|
0
|
|
0
|
|
--------- Finished --------------
|