move explorer and cmd. Add a few .rbuild files
[reactos.git] / reactos / base / shell / cmd / seta_test.cmd
1 @echo off
2
3 @rem the next line reexecutes the script without params if it was called with params, else we'll get false failures
4 @if not "%1"=="" seta_test.cmd
5
6 @rem the next two lines illustrate bug in existing if code
7 if not "=="=="==" goto failure
8 if "=="=="==" goto next1
9 goto failure
10 :next1
11 if "1"=="2" goto failure
12 if not "1"=="1" goto failure
13 set /a a=1
14 echo.
15 if not "%a%"=="1" goto failure
16 set /a b=a
17 echo.
18 if not "%b%"=="1" goto failure
19 set /a a=!5
20 echo.
21 if not "%a%"=="0" goto failure
22 set /a a=!a
23 echo.
24 if not "%a%"=="1" goto failure
25 set /a a=~5
26 echo.
27 if not "%a%"=="-6" goto failure
28 set /a a=5,a=-a
29 echo.
30 if not "%a%"=="-5" goto failure
31 set /a a=5*7
32 echo.
33 if not "%a%"=="35" goto failure
34 set /a a=2000/10
35 echo.
36 if not "%a%"=="200" goto failure
37 set /a a=42%%9
38 echo.
39 if not "%a%"=="6" goto failure
40 set /a a=5%2
41 echo.
42 if not "%a%"=="5" goto failure
43 set /a a=42^%13
44 echo.
45 if not "%a%"=="423" goto failure
46 set /a a=7+9
47 echo.
48 if not "%a%"=="16" goto failure
49 set /a a=9-7
50 echo.
51 if not "%a%"=="2" goto failure
52 set /a a=9^<^<2
53 echo.
54 if not "%a%"=="36" goto failure
55 set /a a=36^>^>2
56 echo.
57 if not "%a%"=="9" goto failure
58 set /a a=42^&9
59 echo.
60 if not "%a%"=="8" goto failure
61 set /a a=32^9
62 echo.
63 if not "%a%"=="329" goto failure
64 set /a a=32^^9
65 echo.
66 if not "%a%"=="41" goto failure
67 set /a a=10^|22
68 echo.
69 if not "%a%"=="30" goto failure
70 set /a a=2,a*=3
71 echo.
72 if not "%a%"=="6" goto failure
73 set /a a=11,a/=2
74 echo.
75 if not "%a%"=="5" goto failure
76 set /a a=42,a%%=9
77 echo.
78 if not "%a%"=="6" goto failure
79 set /a a=7,a+=9
80 echo.
81 if not "%a%"=="16" goto failure
82 set /a a=9,a-=7
83 echo.
84 if not "%a%"=="2" goto failure
85 set /a a=42,a^&=9
86 echo.
87 if not "%a%"=="8" goto failure
88 set /a a=32,a^^=9
89 echo.
90 if not "%a%"=="41" goto failure
91 set /a a=10,a^|=22
92 echo.
93 if not "%a%"=="30" goto failure
94 set /a a=9,a^<^<=2
95 echo.
96 if not "%a%"=="36" goto failure
97 set /a a=36,a^>^>=2
98 echo.
99 if not "%a%"=="9" goto failure
100 set /a a=1,2
101 echo.
102 if not "%a%"=="1" goto failure
103 set /a a=(a=1,a+2)
104 echo.
105 if "%a%"=="3" goto success
106 goto failure
107
108 :success
109 echo SUCCESS!
110 echo.
111 goto done
112
113 :failure
114 echo FAILURE! remove the echo off and see the last formula that executed before this line
115 echo.
116 :done