wscript: Implemented Host_get_ScriptName.
[wine] / programs / cmd / tests / test_builtins.cmd.exp
1
2 @pwd@>echo Tests for cmd's builtin commands@space@
3 Tests for cmd's builtin commands
4
5 @pwd@>echo ------------ Testing 'echo' [ON] --------------@space@
6 ------------ Testing 'echo' [ON] --------------
7
8 @pwd@>echo word@space@
9 word
10
11 @pwd@>echo 'singlequotedword'@space@
12 'singlequotedword'
13
14 @pwd@>echo "doublequotedword"@space@
15 "doublequotedword"
16 at-echoed-word
17
18 @pwd@>echo "/?"@space@
19 "/?"
20
21 @pwd@>echo.
22
23
24 @pwd@>echo .@space@
25 .
26
27 @pwd@>echo.word
28 word
29
30 @pwd@>echo .word@space@
31 .word
32
33 @pwd@>echo word@space@@space@
34 word@space@
35
36 @pwd@>echo word@space@@space@@space@
37 word@space@@space@
38 ------------ Testing 'echo' [OFF] --------------
39 word
40 'singlequotedword'
41 "doublequotedword"
42 at-echoed-word
43 "/?"
44
45 .
46 word
47 .word
48 word@space@
49 word@space@@space@
50 ------------ Testing 'set' --------------
51 0
52 1
53 @todo_wine@0
54 FOOBAR not defined
55 @todo_wine@  baz
56 FOOBAR =  baz
57 @todo_wine@0
58 @todo_wine@  baz2
59 @todo_wine@0
60  bar
61 @todo_wine@FOOBAR= bar
62 @todo_wine@FOOBAR =  baz2
63 FOOBAR =  baz
64 FOOBAR not defined
65 1
66 bar
67 foobar
68 FOO not defined
69 BAZ=bazbaz
70 bazbaz
71 set "FOO=bar" should not include the quotes in the variable value
72 bar
73 ------------ Testing variable expansion --------------
74 ~dp0 should be directory containing batch file
75 @pwd@\
76 @pwd@\
77 CD value @pwd@@or_broken@CD value
78 %
79 P
80 P
81 S
82 P
83 PS
84 ERRORLEVEL
85 0
86 00
87 0ERRORLEVEL
88 0
89 0%
90 P0
91 0S
92 P0S
93 ------------ Testing type ------------
94
95 @pwd@>type foobaz@space@
96 bar
97
98 @pwd@>echo ***@space@
99 ***
100 bar
101 ***
102 ------------ Testing NUL ------------
103 bar
104 bar
105 bar
106 NUL
107 @todo_wine@foo created
108 ------------ Testing if/else --------------
109 if/else should work with blocks
110 if seems to work
111 else seems to work
112 @todo_wine@if seems not to detect /c as parameter
113 Testing case sensitivity with and without /i option
114 if seems to default to case sensitivity
115 if /i seems to work
116 if /I seems to work
117 -----------Testing for -----------
118 A
119 B
120 C
121 A
122 B
123 C
124 @todo_wine@X Y
125 @todo_wine@A C
126 @todo_wine@A D
127 @todo_wine@B C
128 @todo_wine@B D
129 @todo_wine@A C
130 @todo_wine@A D
131 @todo_wine@B C
132 @todo_wine@B D
133 -----------Testing del /a-----------
134 not-r.test not found after delete, good
135 r.test found before delete, good
136 r.test not found after delete, good
137 ------------ Testing del /q --------------
138 del /q * succeeded on file1
139 del /q * succeeded on file2.dat
140 ------------ Testing del /s --------------
141 ----------- Testing mkdir -----------
142 0
143 0
144 @todo_wine@1
145 @todo_wine@1
146 0
147 0
148 0
149 0
150 0
151 @todo_wine@1
152 0
153 0
154 0
155 dir created
156 0
157 @todo_wine@1
158 @todo_wine@1
159 @todo_wine@1
160 @todo_wine@ok, foo created
161 @todo_wine@1
162 @todo_wine@ok, foo\bar created
163 ----------- Testing rmdir -----------
164 0
165 dir removed
166 0
167 dir removed
168 0
169 0
170 file not removed
171 0
172 non-empty dir not removed
173 0
174 non-empty dir not removed
175 recursive rmdir succeeded
176 recursive rmdir succeeded
177 ------------ Testing CALL --------------
178 foo
179 foo 8
180 bar :testRoutine
181 @todo_wine@0
182 @todo_wine@foo created
183 @todo_wine@Should expand foobaz
184 @todo_wine@batfile
185 @todo_wine@robinfile
186 @todo_wine@1
187 @todo_wine@1
188 non-builtin dir
189 -----------Testing Errorlevel-----------
190 9009
191 1
192 errorlevel just right, good
193 abc0def@or_broken@abc1def
194 errorlevel zero, good@or_broken@errorlevel nonzero, bad
195 7 should be 7
196 7 should still be 7
197 -----------Testing GOTO-----------
198 goto with no leading space worked
199 goto with a leading space worked
200 goto with a leading tab worked
201 goto with a following space worked
202 -----------Done, jumping to EOF-----------