cmd/tests: Add mkdir tests for trailing backslashes and invalid chars handling.
[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 set "FOO=bar" should not include the quotes in the variable value
52 bar
53 ------------ Testing variable expansion --------------
54 ~dp0 should be directory containing batch file
55 @pwd@\
56 @pwd@\
57 CD value @pwd@@or_broken@CD value
58 %
59 P
60 P
61 S
62 P
63 PS
64 ERRORLEVEL
65 0
66 00
67 0ERRORLEVEL
68 0
69 0%
70 P0
71 0S
72 P0S
73 ------------ Testing if/else --------------
74 if/else should work with blocks
75 if seems to work
76 else seems to work
77 Testing case sensitivity with and without /i option
78 if seems to default to case sensitivity
79 if /i seems to work
80 if /I seems to work
81 -----------Testing for -----------
82 A
83 B
84 C
85 A
86 B
87 C
88 @todo_wine@X Y
89 @todo_wine@A C
90 @todo_wine@A D
91 @todo_wine@B C
92 @todo_wine@B D
93 @todo_wine@A C
94 @todo_wine@A D
95 @todo_wine@B C
96 @todo_wine@B D
97 -----------Testing del /a-----------
98 not-r.test not found after delete, good
99 r.test found before delete, good
100 r.test not found after delete, good
101 ------------ Testing del /q --------------
102 del /q * succeeded on file1
103 del /q * succeeded on file2.dat
104 ------------ Testing del /s --------------
105 ----------- Testing mkdir -----------
106 0
107 0
108 @todo_wine@1
109 @todo_wine@1
110 0
111 0
112 0
113 0
114 0
115 @todo_wine@1
116 0
117 0
118 0
119 dir created
120 0
121 @todo_wine@1
122 @todo_wine@1
123 @todo_wine@1
124 @todo_wine@ok, foo created
125 @todo_wine@1
126 @todo_wine@ok, foo\bar created
127 -----------Testing Errorlevel-----------
128 1
129 errorlevel just right, good
130 abc0def@or_broken@abc1def
131 errorlevel zero, good@or_broken@errorlevel nonzero, bad
132 7 should be 7
133 7 should still be 7
134 -----------Testing GOTO-----------
135 goto with no leading space worked
136 goto with a leading space worked
137 goto with a leading tab worked
138 goto with a following space worked
139 -----------Done, jumping to EOF-----------