[NTVDM]: Reorganize code.
[reactos.git] / rostests / winetests / cmd / 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:
34
35
36 @pwd@>echo :@space@
37 :
38
39 @pwd@>echo:word
40 word
41
42 @pwd@>echo :word@space@
43 :word
44
45 @pwd@>echo off now@space@
46 off now
47
48 @pwd@>echo word@space@@space@
49 word@space@
50
51 @pwd@>echo word@space@@space@@space@
52 word@space@@space@
53
54 @pwd@>echo word@space@
55 word
56
57 @pwd@>echo@tab@word@space@
58 word
59
60 @pwd@>echo@tab@word@space@@tab@@space@
61 word@space@@tab@
62
63 @pwd@>echo@tab@word@tab@@space@@space@
64 word@tab@@space@
65
66 @pwd@>echo word@space@
67 word
68
69 @pwd@>echo@space@@tab@word@space@
70 @tab@word
71
72 @pwd@>echo@space@@space@@tab@word@space@
73 @space@@tab@word
74
75 @pwd@>echo@tab@@tab@word@space@
76 @tab@word
77
78 @pwd@>echo @tab@ on @space@@space@
79 noecho1
80 noecho2
81 echo3
82 ------------ Testing 'echo' [OFF] ------------
83 word
84 'singlequotedword'
85 "doublequotedword"
86 at-echoed-word
87 "/?"
88
89 .
90 word
91 .word
92
93 :
94 word
95 :word
96 on again
97 word@space@
98 word@space@@space@
99 word
100 word
101 word@space@@tab@
102 word@tab@@space@
103 word
104 @tab@word
105 @space@@tab@word
106 @tab@word
107 ------------ Testing mixed echo modes ------------
108 @echo on
109 if 1==1 echo foo
110 if 1==1 @echo bar
111 @echo off
112 if 1==1 echo foo2
113 if 1==1 @echo bar2
114
115 @todo_wine@@pwd@>if 1 == 1 echo foo@space@
116 foo
117
118 @todo_wine@@pwd@>if 1 == 1@space@
119 bar
120 foo2
121 bar2
122 ------------ Testing parameterization ------------
123 'a', 'b', 'c'
124 '"a b c"', '', ''
125 '"a b"\c', '', ''
126 'a', '~`+', '.{}!+b'
127 'a', 'b', ''
128 '"a;b"', '', ''
129 'a', 'b', ''
130 'a[b]{c}(d)e', '', ''
131 'a', '', ''
132 second line
133 'a', 'b', 'c'
134 'a', 'b', 'c'
135 'a', 'b', ''
136 ------------ Testing rem ------------
137
138 @pwd@>rem Hello@space@
139
140 @pwd@>rem Hello@space@
141
142 @pwd@>rem Hello || foo@space@
143
144 @pwd@>rem echo lol@space@
145
146 @pwd@>rem echo foo & echo bar@space@
147
148 @pwd@>rem @tab@ Hello@space@
149
150 @pwd@>rem@tab@ Hello@space@
151
152 @pwd@>rem@tab@echo foo & echo bar@space@
153 ------------ Testing redirection operators ------------
154 --- stdout redirection
155 foo
156 foo@space@
157 foo@tab@
158 foo@space@
159 foo@tab@
160 foo7@space@@or_broken@foo@tab@
161 foo9@space@@or_broken@foo@tab@
162 foo1
163 foo11
164 foo12
165 foo13
166 foo14
167 foo15
168 --- stdout appending
169 foo
170 foo@space@
171 foob@space@
172 foob@space@
173 fooc@space@
174 foob@space@
175 fooc@space@
176 food1
177 foob@space@
178 fooc@space@
179 food1
180 food2
181 food21
182 @todo_wine@foo7@space@@space@@or_broken@not supported@space@
183 @todo_wine@foo@or_broken@not supported
184 --- redirections within IF statements
185 @todo_wine@foo1
186 -----
187 foo2
188 foo3
189 file does not exist, ok
190 foo4
191 baz5
192 baz6@space@
193 baz7
194 baz8
195 baz
196 foo@space@
197 baz
198 foo
199 A
200 B
201 C
202 ------------ Testing circumflex escape character ------------
203 hello, world
204 hello, world
205 hell^o, world
206 hell^o, world
207 helloworld
208 hello
209 world
210 hello
211
212 finished
213 baz
214 baz
215 foo | echo bar
216 foo & echo bar
217 bak &
218 baz@space@
219 0@or_broken@1
220 foo > foo
221 <
222 ffoof
223 WINE_FOO=bar | baz
224 0
225 WINE_FOO=bar ^| baz
226 bar | baz
227 0
228 ------------ Testing 'set' ------------
229 1
230 0
231 WINE_FOOBAR not defined
232 baz
233 WINE_FOOBAR = baz
234 0
235 baz2
236 0
237 bar
238 WINE_FOOBAR= bar
239 WINE_FOOBAR = baz2
240 WINE_FOOBAR = baz2
241 WINE_FOOBAR not defined
242 1
243 bar
244 foobar
245 WINE_FOO not defined
246 WINE_BAZ=bazbaz
247 bazbaz
248 set "WINE_FOO=bar" should not include the quotes in the variable value
249 bar
250 foo
251 ''
252 'foo@space@'
253 'foo@tab@'
254 ------------ Testing variable expansion ------------
255 ~dp0 should be directory containing batch file
256 @pwd@\
257 @pwd@\
258 CD value @pwd@@or_broken@CD value@space@
259 %
260 P
261 P
262 S
263 P
264 PS
265 ERRORLEVEL
266 0
267 00
268 0ERRORLEVEL
269 0
270 0%
271 P0
272 0S
273 P0S
274 ------------ Testing variable substrings ------------
275 q
276 qwe
277 er
278 'ty'@or_broken@''
279 't'@or_broken@''
280 ert@or_broken@qwerty
281 e@or_broken@qwerty
282 ''@or_broken@'qwerty'
283 r@or_broken@qwerty
284 ------------ Testing variable substitution ------------
285 --- in FOR variables
286 "A B"
287 C
288 "A B"
289 C
290 'A B'@or_broken@''
291 'C'@or_broken@''
292 @pwd@\C D@or_broken@%~ff
293 @pwd@\E@or_broken@%~ff
294 @drive@
295 @drive@
296 @path@@or_broken@%~pd
297 @path@@or_broken@%~pd
298 L M
299 N
300 '.OOL'
301 '.TABC'
302 ''
303 @todo_wine@'@drive@@shortpath@R S'@or_broken@''
304 @todo_wine@'@drive@@shortpath@T'@or_broken@''
305 @todo_wine@'@drive@@shortpath@ABCDEFGHIJK.LMNOP'@or_broken@''
306 ''@or_broken@'%~ai'
307 ''@or_broken@'%~ai'
308 '--a------'@or_broken@'%~ai'
309 '5'@or_broken@'%~zi'
310 ''@or_broken@'%~ti'
311 ''@or_broken@'%~ti'
312 ''@or_broken@'%~zi'
313 ''@or_broken@'%~zi'
314 @drive@@path@
315 @drive@@path@
316 @drive@
317 @drive@
318 @drive@
319 @drive@
320 ''
321 '.eh'
322 --- in parameters
323 "A B"
324 C
325 'A B'@or_broken@''
326 'C'@or_broken@''
327 @pwd@\C D
328 @pwd@\E
329 @drive@
330 @drive@
331 @path@
332 @path@
333 L M
334 N
335 '.OOL'
336 '.TABC'
337 ''
338 @todo_wine@'@drive@@shortpath@R S'@or_broken@''
339 @todo_wine@'@drive@@shortpath@T'@or_broken@''
340 @todo_wine@'@drive@@shortpath@ABCDEFGHIJK.LMNOP'@or_broken@''
341 @drive@@path@
342 @drive@@path@
343 @drive@
344 @drive@
345 @drive@
346 @drive@
347 ''
348 '.eh'@or_broken@''
349 ------------ Testing variable delayed expansion ------------
350 --- default mode (load-time expansion)
351 foo
352 !WINE_FOO!
353 foo
354 foo
355 --- runtime (delayed) expansion mode
356 foo
357 foo@or_broken@!WINE_FOO!
358 foo
359 bar@or_broken@foo
360 0
361 0@or_broken@1
362 foo
363 !WINE_FOO!
364 --- using /V cmd flag
365 foo
366 foo@or_broken@!WINE_FOO!
367 foo
368 !WINE_FOO!
369 ------------ Testing conditional execution ------------
370 --- unconditional ampersand
371 foo1
372 bar2@space@
373 foo2
374 foobar deleted
375 --- on success conditional and
376 @todo_wine@foo3 not created
377 bar4@space@
378 foo4
379 --- on failure conditional or
380 foo5
381 foo6@space@
382 @todo_wine@------------ Testing cd ------------
383 singleFile
384 Current dir: @pwd@\foobar@or_broken@Current dir:@space@
385 @pwd@\foobar
386 @pwd@
387 @pwd@\foobar
388 @pwd@
389 @pwd@\foobar
390 @pwd@
391 @pwd@
392 @pwd@
393 @pwd@\foobar\bar bak
394 @pwd@\foobar\bar bak
395 @pwd@\foobar\bar bak
396 @pwd@\foobar\bar bak
397 @pwd@\foobar\bar bak
398 @pwd@
399 @pwd@\foobar
400 ------------ Testing type ------------
401
402 @pwd@>type foobaz@space@
403 bar
404
405 @pwd@>echo ---@space@
406 ---
407 bar
408 ---1
409 bar
410 ---2
411 bar
412 ---3
413 ------------ Testing NUL ------------
414 bar
415 bar
416 bar
417 NUL
418 foo created
419 Passed: file size check on a.a [7]@or_broken@Skipping file size check on NT4
420 Passed: file size check on b.b [8]@or_broken@Skipping file size check on NT4
421 Passed: file size check on a.a [7]@or_broken@Skipping file size check on NT4
422 Passed: file size check on b.b [8]@or_broken@Skipping file size check on NT4
423 Passed: file size check on a.a [7]@or_broken@Skipping file size check on NT4
424 Passed: file size check on subdir\a.a [8]@or_broken@Skipping file size check on NT4
425 ------------ Testing if/else ------------
426 --- if/else should work with blocks
427 if seems to work
428 else seems to work
429 if seems not to detect /c as parameter
430 --- case sensitivity with and without /i option
431 if seems to default to case sensitivity
432 if /i seems to work
433 if /I seems to work
434 --- string comparisons
435 equal
436 non equal
437 non equal
438 equal
439 --- tabs handling
440 doom
441 doom
442 doom
443 lol
444 quake
445 quake
446 quake
447 --- comparison operators
448 ------ for strings
449 LSS string can be used as operand for LSS comparison
450 floats are handled as strings
451 numbers in quotes are handled as strings
452 negative numbers as well@or_broken@NT4
453 if /i seems to work for LSS
454 A LSS B
455 A LSS AB
456 A LSS BA
457 A LSS AA
458 B LSS BA
459 AB LSS B
460 AB LSS BA
461 AA LSS B
462 AA LSS AB
463 AA LSS BA
464 b LSS B@or_broken@NT4
465 a LSS B@or_broken@NT4
466 a LSS B insensitive
467 A LSS b
468 A LSS b insensitive
469 A LEQ A
470 A LEQ B
471 A LEQ AB
472 A LEQ BA
473 A LEQ AA
474 B LEQ B
475 B LEQ BA
476 AB LEQ B
477 AB LEQ AB
478 AB LEQ BA
479 BA LEQ BA
480 AA LEQ B
481 AA LEQ AB
482 AA LEQ BA
483 AA LEQ AA
484 b LEQ B@or_broken@NT4
485 b LEQ B insensitive
486 a LEQ B@or_broken@NT4
487 a LEQ B insensitive
488 A LEQ b
489 A LEQ b insensitive
490 A EQU A
491 B EQU B
492 AB EQU AB
493 BA EQU BA
494 AA EQU AA
495 A EQU a insensitive
496 A NEQ B
497 A NEQ AB
498 A NEQ BA
499 A NEQ AA
500 B NEQ A
501 B NEQ AB
502 B NEQ BA
503 B NEQ AA
504 AB NEQ A
505 AB NEQ B
506 AB NEQ BA
507 AB NEQ AA
508 BA NEQ A
509 BA NEQ B
510 BA NEQ AB
511 BA NEQ AA
512 AA NEQ A
513 AA NEQ B
514 AA NEQ AB
515 AA NEQ BA
516 A GEQ A
517 B GEQ A
518 B GEQ B
519 B GEQ AB
520 B GEQ AA
521 AB GEQ A
522 AB GEQ AB
523 AB GEQ AA
524 BA GEQ A
525 BA GEQ B
526 BA GEQ AB
527 BA GEQ BA
528 BA GEQ AA
529 AA GEQ A
530 AA GEQ AA
531 B GTR A
532 B GTR AB
533 B GTR AA
534 AB GTR A
535 AB GTR AA
536 BA GTR A
537 BA GTR B
538 BA GTR AB
539 BA GTR AA
540 AA GTR A
541 ------ for numbers
542 negative numbers handled
543 negative numbers handled
544 octal handled
545 also in negative form
546 hexa handled
547 also in negative form
548 11 LSS 101
549 0 LSS 1
550 0 LSS 10
551 0 LSS 9
552 1 LSS 10
553 1 LSS 9
554 9 LSS 10
555 0 LEQ 0
556 0 LEQ 1
557 0 LEQ 10
558 0 LEQ 9
559 1 LEQ 1
560 1 LEQ 10
561 1 LEQ 9
562 10 LEQ 10
563 9 LEQ 10
564 9 LEQ 9
565 0 EQU 0
566 1 EQU 1
567 10 EQU 10
568 9 EQU 9
569 octal ok
570 hexa ok
571 string/hexa compare ok
572 string/hexa compare ok
573 0 NEQ 1
574 0 NEQ 10
575 0 NEQ 9
576 1 NEQ 0
577 1 NEQ 10
578 1 NEQ 9
579 10 NEQ 0
580 10 NEQ 1
581 10 NEQ 9
582 9 NEQ 0
583 9 NEQ 1
584 9 NEQ 10
585 0 GEQ 0
586 1 GEQ 0
587 1 GEQ 1
588 10 GEQ 0
589 10 GEQ 1
590 10 GEQ 10
591 10 GEQ 9
592 9 GEQ 0
593 9 GEQ 1
594 9 GEQ 9
595 1 GTR 0
596 10 GTR 0
597 10 GTR 1
598 10 GTR 9
599 9 GTR 0
600 9 GTR 1
601 ------ for numbers and stringified numbers
602 strings and integers not equal
603 strings and integers not equal
604 foo
605 "10" GEQ "1"
606 '1' GEQ 1@or_broken@NT4
607 1 GEQ "1"
608 "1" GEQ "1"
609 '1' GEQ "1"
610 "10" GEQ "1"
611 non NT4@or_broken@1 GEQ '1'
612 '1' GEQ '1'
613 foo
614 1 GEQ "10"
615 foo
616 '1' GEQ "10"
617 "10" GEQ "10"
618 ------------ Testing for ------------
619 --- plain FOR
620 A
621 B
622 C
623 %I
624 %I
625 %I
626 %j
627 %j
628 %j
629 A
630 B
631 C
632 1
633 4
634 1
635 A
636 B
637 C
638 X
639 X2
640 X3
641 foo
642 M
643 X
644 M
645 N
646 O
647 `echo
648 A
649 B`
650 'echo
651 A
652 B'
653 "echo A B"
654 "A B"
655 C
656 --- imbricated FORs
657 X Y
658 X Y
659 A C
660 A D
661 B C
662 B D
663 A C
664 A D
665 B C
666 B D
667 --- basic wildcards
668 bazbaz
669 --- for /d
670 baz@space@
671 foo@space@
672 bar@space@
673 PASSED
674 xxx - Should be xxx
675 Expected second line
676 --- for /R
677 Plain directory enumeration
678 Plain directory enumeration from provided root
679 File enumeration
680 File enumeration from provided root
681 Mixed enumeration
682 Mixed enumeration from provided root
683 With duplicates enumeration
684 Strip missing wildcards, keep unwildcarded names
685 for /R passed
686 --- for /L
687 1
688 3
689 5
690 1
691 3
692 5
693 0
694 2
695 1
696 -1
697 ErrorLevel 0
698 ErrorLevel 0
699 1
700 2
701 3
702 4
703 1
704 3
705 4
706 3
707 2
708 1
709 4
710 2
711 0
712 1
713 1
714 -1
715 -1
716 1
717 3
718 --- set /a
719 ------ individual operations
720 WINE_foo correctly 3
721 WINE_foo correctly -1
722 WINE_foo correctly 3
723 WINE_foo correctly 6
724 WINE_foo correctly 10
725 WINE_foo correctly 4
726 WINE_foo correctly 4
727 WINE_foo correctly -4
728 WINE_foo correctly 0
729 WINE_foo correctly 2
730 WINE_foo correctly 2
731 WINE_foo correctly -2
732 WINE_foo correctly 1
733 WINE_foo correctly 4
734 WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly 1073741824 [0]
735 WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly -1073741824 [0]
736 WINE_foo correctly -4
737 WINE_foo correctly 9
738 WINE_foo correctly 2
739 WINE_foo correctly 0
740 WINE_foo correctly -1
741 WINE_foo correctly -3
742 WINE_foo correctly 0
743 WINE_foo correctly 1
744 WINE_foo correctly 1
745 WINE_foo correctly 4
746 WINE_foo correctly 1
747 WINE_foo correctly 5
748 WINE_foo correctly 5
749 WINE_foo correctly 7
750 WINE_foo correctly 5
751 WINE_foo correctly 5
752 WINE_foo correctly 5
753 WINE_foo correctly 4
754 WINE_foo correctly 6
755 WINE_foo correctly 1
756 WINE_foo correctly 4
757 ------ precedence and grouping
758 WINE_foo correctly 10
759 WINE_foo correctly 18@or_broken@ERROR: WINE_foo incorrectly [18]
760 WINE_foo correctly 2@or_broken@ERROR: WINE_foo incorrectly 0 [2]
761 WINE_foo correctly 2@or_broken@ERROR: WINE_foo incorrectly [2]
762 WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly 4 [0]
763 WINE_foo correctly 4@or_broken@ERROR: WINE_foo incorrectly [4]
764 WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly [3]
765 WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly [3]
766 ------ octal and hexadecimal
767 WINE_foo correctly 18
768 WINE_foo correctly 18
769 WINE_foo correctly 15
770 WINE_foo correctly 3
771 ------ variables
772 WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly 0 [3]
773 WINE_bar correctly 3@or_broken@ERROR: WINE_bar incorrectly [3]
774 WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly 0 [3]
775 WINE_bar correctly 4@or_broken@ERROR: WINE_bar incorrectly [4]
776 WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly 0 [3]
777 WINE_bar correctly 3@or_broken@ERROR: WINE_bar incorrectly [3]
778 WINE_baz correctly 4@or_broken@ERROR: WINE_baz incorrectly [4]
779 WINE_foo correctly 9@or_broken@ERROR: WINE_foo incorrectly 3 [9]
780 WINE_bar correctly 9@or_broken@ERROR: WINE_bar incorrectly 3 [9]
781 WINE_foo correctly 0
782 WINE_foo correctly 4
783 WINE_bar correctly 4
784 WINE_foo correctly -7@or_broken@ERROR: WINE_foo incorrectly 4 [-7]
785 WINE_bar correctly -7@or_broken@ERROR: WINE_bar incorrectly 4 [-7]
786 WINE_foo correctly -1@or_broken@ERROR: WINE_foo incorrectly -7 [-1]
787 WINE_bar correctly -1@or_broken@ERROR: WINE_bar incorrectly -7 [-1]
788 WINE_foo correctly 5@or_broken@ERROR: WINE_foo incorrectly 0 [5]
789 WINE_bar correctly 1@or_broken@ERROR: WINE_bar incorrectly [1]
790 WINE_foo correctly 4@or_broken@ERROR: WINE_foo incorrectly 1 [4]
791 WINE_bar correctly 4@or_broken@ERROR: WINE_bar incorrectly 1 [4]
792 WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly 4 [1]
793 WINE_bar correctly 1@or_broken@ERROR: WINE_bar incorrectly 4 [1]
794 WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly 1 [0]
795 WINE_bar correctly 0@or_broken@ERROR: WINE_bar incorrectly 1 [0]
796 WINE_foo correctly 5@or_broken@ERROR: WINE_foo incorrectly 0 [5]
797 WINE_bar correctly 7@or_broken@ERROR: WINE_bar incorrectly [7]
798 WINE_foo correctly 5@or_broken@ERROR: WINE_foo incorrectly 0 [5]
799 WINE_bar correctly 7@or_broken@ERROR: WINE_bar incorrectly [7]
800 WINE_foo correctly 19@or_broken@ERROR: WINE_foo incorrectly 0 [19]
801 WINE_bar correctly 3@or_broken@ERROR: WINE_bar incorrectly [3]
802 WINE_baz correctly 4
803 --- quotes
804 WINE_foo correctly 1
805 WINE_foo correctly 1
806 WINE_foo correctly 1
807 WINE_bar correctly 2
808 WINE_foo correctly 1
809 WINE_bar correctly 2
810 WINE_foo correctly 1
811 WINE_bar correctly 2
812 WINE_foo correctly 1
813 WINE_bar correctly 2
814 WINE_foo correctly 1
815 WINE_bar correctly 2
816 WINE_baz correctly 3
817 WINE_foo correctly 1
818 WINE_bar correctly 2
819 WINE_baz correctly 3
820 WINE_foo correctly 1
821 WINE_bar correctly 2
822 WINE_baz correctly 3
823 WINE_foo correctly 1
824 WINE_bar correctly 2
825 WINE_baz correctly 3
826 WINE_foo correctly 1
827 WINE_bar correctly 2
828 WINE_baz correctly 3
829 WINE_foo correctly 1
830 WINE_foo correctly 1
831 WINE_bar correctly 5
832 WINE_baz correctly 2
833 WINE_foo correctly 18
834 WINE_foo correctly 3
835 WINE_bar correctly 7@or_broken@ERROR: WINE_bar incorrectly 4 [7]
836 --- whitespace are ignored between double char operators
837 WINE_foo correctly 10@or_broken@ERROR: WINE_foo incorrectly 4 [10]
838 WINE_bar correctly 50@or_broken@ERROR: WINE_bar incorrectly 5 [50]
839 WINE_foo correctly 772@or_broken@ERROR: WINE_foo incorrectly 4 [772]
840 WINE_bar correctly 7720@or_broken@ERROR: WINE_bar incorrectly 5 [7720]
841 --- invalid operator sequence
842 4
843 4
844 ----- negative prefix
845 WINE_foo correctly -1
846 WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly [1]
847 WINE_foo correctly 6
848 WINE_foo correctly 0
849 WINE_foo correctly 6
850 WINE_foo correctly 2
851 WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly [0]
852 WINE_foo correctly 5
853 WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly -5 [3]
854 ----- assignment tests involving the end destination
855 WINE_foo correctly 11@or_broken@ERROR: WINE_foo incorrectly 3 [11]
856 WINE_foo correctly 6@or_broken@ERROR: WINE_foo incorrectly 2 [6]
857 WINE_bar correctly 9@or_broken@ERROR: WINE_bar incorrectly [9]
858 WINE_foo correctly 6@or_broken@ERROR: WINE_foo incorrectly 2 [6]
859 WINE_bar correctly 10@or_broken@ERROR: WINE_bar incorrectly [10]
860 WINE_baz correctly 7@or_broken@ERROR: WINE_baz incorrectly [7]
861 WINE_foo correctly 7@or_broken@ERROR: WINE_foo incorrectly 2 [7]
862 WINE_bar correctly 7@or_broken@ERROR: WINE_bar incorrectly 2 [7]
863 ----- equal precedence on stack
864 WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly 0 [1]
865 WINE_foo correctly 0
866 WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly [1]
867 WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly [0]
868 WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly [1]
869 WINE_foo correctly -1@or_broken@ERROR: WINE_foo incorrectly [-1]
870 WINE_foo correctly -1@or_broken@ERROR: WINE_foo incorrectly [-1]
871 WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly [1]
872 WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly [0]
873 WINE_foo correctly -1
874 WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly -1 [0]
875 WINE_foo correctly 0
876 WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly 0 [1]
877 WINE_foo correctly -1@or_broken@ERROR: WINE_foo incorrectly 0 [-1]
878 WINE_foo correctly 25@or_broken@ERROR: WINE_foo incorrectly 20 [25]
879 WINE_foo correctly 20
880 WINE_foo correctly 1
881 WINE_foo correctly 4
882 WINE_foo correctly 7
883 WINE_foo correctly 8@or_broken@ERROR: WINE_foo incorrectly 4 [8]
884 WINE_foo correctly 6@or_broken@ERROR: WINE_foo incorrectly 5 [6]
885 WINE_bar correctly 6@or_broken@ERROR: WINE_bar incorrectly 5 [6]
886 --- for /F
887 ------ string argument
888 a
889 a@or_broken@no output
890 a
891 a@or_broken@no output
892 a
893 a@or_broken@no output
894 a
895 a@or_broken@no output
896 a
897 a@or_broken@no output
898 ------ fileset argument
899 --------- basic blank handling
900 a
901 a
902 a
903 a
904 a
905 b
906 --------- multi-line with empty lines
907 a
908 b
909 c
910 --------- multiple files
911 a
912 b
913 c
914 q
915 kkk
916 q
917 kkk
918 a
919 b
920 c
921 ------ command argument
922 Passed1@or_broken@Missing functionality - Broken1
923 Passed2@or_broken@Missing functionality - Broken2
924 Passed3@or_broken@Missing functionality - Broken3
925 ------ eol option
926 and@or_broken@Broken NT4 functionality1
927 Line@or_broken@Broken NT4 functionality2
928 Line@or_broken@Broken NT4 functionality3
929 ad
930 z@y
931 a|d
932 no output
933 no output
934 ------ delims option
935 a
936 a@space@
937 a d
938 a
939 C r
940 foo bar baz
941 @todo_wine@c:\
942 ------ skip option
943 c
944 no output
945 no output
946 c
947 c
948 no output
949 ------ tokens= option
950 h=%h i=a j=%j k=%k l=%l m=%m o=%o
951 h=%h i=b j=%j k=%k l=%l m=%m o=%o
952 h=%h i=a j=c k=e l=f m=g o=%o
953 h=%h i=a j=e k=f g l=%l m=%m o=%o
954 h=%h i=f j=i k=j k l m n o p q r s t u v w x y z l=%l m=%m o=%o
955 h=%h i=f j=i k=j k l m n;;== o p q r s t u v w x y z l=%l m=%m o=%o
956 h=%h i=a j=b k=c l=d e f g m=%m n=%n o=%o
957 h=%h i=a j=b k=c l=d e f g m=%m n=%n o=%o
958 h=%h i=a j=b k= l= m=%m n=%n o=%o
959 h=%h i=a j=e k=y l=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 m=%m n=%n o=%o
960 h=%h i=a j=b k= l= m= n=%n o=%o
961 h=%h i=a j=b k= l= m= n= o=%o
962 u=a v=b w=c x=d y=e z=f A=%A a=%a
963 @todo_wine@U=a V=b W=c X=d Y=e Z=f A=%A a=m
964 h=%h i=a j=b k=c l=e m=%m o=%o@or_broken@h=%h i=a j=b k=c l=e m= o=%o
965 h=%h i=e j=%j k=%k l=%l m=%m o=%o
966 h=%h i=a j=b k=c l=d e f g m=%m n=%n o=%o@or_broken@h=%h i=a j=b k=c l=d e f g m= n=%n o=%o
967 h=%h i=a j=c k= l= m=%m n=%n o=%o@or_broken@h=%h i=a j=c k= l= m= n=%n o=%o
968 h=%h i=b j=c k= l= m=%m n=%n o=%o@or_broken@h=%h i=b j=c k= l= m= n=%n o=%o
969 h=%h i=b j=c k= l= m=%m n=%n o=%o@or_broken@h=%h i=b j=c k= l= m= n=%n o=%o
970 ------------ Testing del /a ------------
971 not-r.test not found after delete, good
972 r.test found before delete, good
973 r.test not found after delete, good
974 ------------ Testing del /q ------------
975 del /q * succeeded on file1
976 del /q * succeeded on file2.dat
977 ------------ Testing del /s ------------
978 ------------ Testing rename ------------
979 --- ren and rename are synonymous
980 foo renamed to bar
981 bar renamed to foo
982 --- name collision
983 foo
984 bar
985 --- rename read-only files
986 read-only file renamed
987 --- rename directories
988 dir renamed
989 read-only dir renamed
990 --- rename in other directory
991 rename impossible in other directory
992 original file still present
993 ------------ Testing move ------------
994 --- file move
995 file move succeeded
996 @todo_wine@file move with overwrite succeeded@or_broken@file overwrite impossible!
997 @todo_wine@bar@or_broken@baz
998 read-only files are moveable
999 file moved in subdirectory
1000 @todo_wine@moving a file to itself is a no-op@or_broken@moving a file to itself should be a no-op!
1001 @todo_wine@ErrorLevel: 0@or_broken@ErrorLevel: 1
1002 --- directory move
1003 simple directory move succeeded
1004 moving a directory to itself gives error; errlevel 1
1005 ------ dir in dir move
1006 foo
1007 bar2
1008 foo2
1009 ------------ Testing mkdir ------------
1010 --- md and mkdir are synonymous
1011 0
1012 0
1013 --- creating an already existing directory/file must fail
1014 1
1015 1
1016 --- multilevel path creation
1017 0
1018 0
1019 0
1020 0
1021 0
1022 1
1023 0
1024 0
1025 --- trailing backslashes
1026 0
1027 dir created
1028 0
1029 --- invalid chars
1030 mkdir ? gives errorlevel 1
1031 mkdir ?\foo gives errorlevel 1
1032 mkdir foo\? gives errorlevel 1
1033 ok, foo created
1034 mkdir foo\bar\? gives errorlevel 1
1035 ok, foo\bar created
1036 --- multiple directories at once
1037 foo created
1038 bar created
1039 foobar created
1040 bar\baz created
1041 bazbaz created
1042 zabzab created
1043 mkdir foo\* errorlevel 1
1044 ok, foo created
1045 ------------ Testing rmdir ------------
1046 0
1047 dir removed
1048 0
1049 dir removed
1050 0
1051 0
1052 file not removed
1053 0
1054 non-empty dir not removed
1055 0
1056 non-empty dir not removed
1057 recursive rmdir succeeded
1058 recursive rmdir succeeded
1059 foo removed
1060 bar removed
1061 foobar removed
1062 bar\baz removed
1063 ------------ Testing pushd/popd ------------
1064 @pwd@
1065 --- popd is no-op when dir stack is empty
1066 @pwd@
1067 --- pushing non-existing dir
1068 @pwd@
1069 --- basic behaviour
1070 @pwd@\foobar
1071 @pwd@
1072 @pwd@\foobar\baz
1073 @pwd@\foobar
1074 @pwd@\foobar
1075 @pwd@
1076 @pwd@\foobar
1077 @pwd@
1078 ------------ Testing attrib ------------
1079 A @pwd@\foobar\foo@or_broken@A @pwd@\foobar\foo@or_broken@A I @pwd@\foobar\foo
1080 --- read-only attribute
1081 A R @pwd@\foobar\foo@or_broken@A R @pwd@\foobar\foo@or_broken@A R I @pwd@\foobar\foo
1082 foo
1083 foo original contents
1084 Read-only file not deleted
1085 Read-only file forcibly deleted
1086 --- recursive behaviour
1087 A @pwd@\foobar\baz\level2@or_broken@A @pwd@\foobar\baz\level2@or_broken@A I @pwd@\foobar\baz\level2
1088 A R @pwd@\foobar\level1@or_broken@A R @pwd@\foobar\level1@or_broken@A R I @pwd@\foobar\level1
1089 A R @pwd@\foobar\baz\level2@or_broken@A R @pwd@\foobar\baz\level2@or_broken@A R I @pwd@\foobar\baz\level2
1090 A @pwd@\foobar\bar@or_broken@A @pwd@\foobar\bar@or_broken@A I @pwd@\foobar\bar
1091 --- folders processing
1092 @pwd@\foobar@or_broken@ @pwd@\foobar@or_broken@ I @pwd@\foobar
1093 @todo_wine@ R @pwd@\foobar\baz@or_broken@ R @pwd@\foobar\baz@or_broken@ @pwd@\foobar\baz@or_broken@ R I @pwd@\foobar\baz
1094 A @pwd@\foobar\baz\toto@or_broken@A @pwd@\foobar\baz\toto@or_broken@A I @pwd@\foobar\baz\toto
1095 toto
1096 lulu
1097 file created in read-only dir
1098 ------------ Testing assoc ------------
1099 --- setting association
1100 ---
1101 .foo=bar
1102 .foo=bar
1103 +++
1104 .foo=bar
1105 --- resetting association
1106 ---
1107 +++
1108 ---
1109 ------------ Testing ftype ------------
1110 --- setting association
1111 ---
1112 footype=foo_opencmd
1113 .foo=footype
1114 footype=foo_opencmd
1115 +++
1116 footype=foo_opencmd
1117 --- resetting association
1118 @todo_wine@original value@or_broken@buggyXP@or_broken@!WINE_FOO!
1119 ------------ Testing CALL ------------
1120 --- external script
1121 foo@space@
1122 foo 8
1123 foo@space@@space@
1124 foo bar@space@
1125 foo ""@space@
1126 "" bar@space@
1127 foo ''@space@
1128 '' bar@space@
1129 --- internal routines
1130 bar :testRoutine
1131 foo@space@
1132 foo bar
1133 foo ""
1134 "" bar
1135 foo ''
1136 '' bar
1137 --- with builtins
1138 0
1139 foo created
1140 Should expand foobaz
1141 batfile
1142 robinfile
1143 1
1144 1
1145 non-builtin dir
1146 Line one
1147 Line two
1148 Get if
1149 ... and else!
1150 passed
1151 ------------ Testing SHIFT ------------
1152 'p1' 'p2' 'p3' 'p4' 'p5'
1153 'p2' 'p3' 'p4' 'p5' ''
1154 'p3' 'p4' 'p5' '' ''
1155 'p3' 'p5' '' '' ''
1156 'p3' 'p5' '' '' ''
1157 'p5' '' '' '' ''
1158 ------------ Testing cmd invocation ------------
1159 --- a batch file can delete itself
1160 file correctly deleted
1161 --- a batch file can alter itself
1162 @todo_wine@bar
1163 ---------- Testing copy
1164 Passed: Found expected dummy.file
1165 Passed: Found expected dir1\file1
1166 Passed: Found expected dir1\file1
1167 Passed: Found expected dir1\file99
1168 Passed: Found expected file1
1169 Passed: Did not find dir2
1170 Passed: Did not find dir2\file1
1171 Passed: Found expected dir1\file1
1172 Passed: Found expected dir1\file2
1173 Passed: Found expected dir1\file3
1174 Passed: Found expected dir1\file1
1175 Passed: Found expected dir1\file2
1176 Passed: Found expected dir1\file3
1177 Passed: Found expected file1
1178 Passed: Found expected file2
1179 Passed: Found expected file3
1180 Passed: Did not find dir2
1181 Passed: Did not find dir2\file1
1182 Passed: Did not find dir2\file2
1183 Passed: Did not find dir2\file3
1184 Passed: Found expected testfile
1185 Passed: Found expected testfile
1186 Passed: Found expected testfile
1187 Passed: Found expected testfile
1188 Passed: Found expected testfile
1189 Passed: Found expected dir1\fred
1190 Passed: Found expected dir1\fred
1191 Passed: Found expected fred
1192 Passed: Found expected fred
1193 Passed: file size check on file1 [5]@or_broken@Skipping file size check on NT4
1194 Passed: file size check on file2 [8]@or_broken@Skipping file size check on NT4
1195 Passed: file size check on file3 [11]@or_broken@Skipping file size check on NT4
1196 Passed: file size check on file1_default [5]@or_broken@Skipping file size check on NT4
1197 Passed: file size check on file1_default2 [5]@or_broken@Skipping file size check on NT4
1198 Passed: file size check on file1_plus_eof [6]@or_broken@Skipping file size check on NT4
1199 Passed: file size check on file2_plus_eof [9]@or_broken@Skipping file size check on NT4
1200 Passed: file size check on file3_plus_eof [12]@or_broken@Skipping file size check on NT4
1201 Passed: file size check on file12_plus_eof [14]@or_broken@Skipping file size check on NT4
1202 Passed: file size check on file12_no_eof [13]@or_broken@Skipping file size check on NT4
1203 Passed: file size check on file12_eof2 [14]@or_broken@Skipping file size check on NT4
1204 Passed: file size check on file1_binary_srccopy [6]@or_broken@Skipping file size check on NT4
1205 Passed: file size check on file1_ascii_srccopy [5]@or_broken@Skipping file size check on NT4
1206 Passed: file size check on file123_default_copy [25]@or_broken@Skipping file size check on NT4
1207 Passed: file size check on file123_ascii_copy [25]@or_broken@Skipping file size check on NT4
1208 Passed: file size check on file123_binary_copy [27]@or_broken@Skipping file size check on NT4
1209 Passed: file size check on file123_mixed_copy1 [26]@or_broken@Skipping file size check on NT4
1210 Passed: file size check on file123_mixed_copy2 [27]@or_broken@Skipping file size check on NT4
1211 Passed: file size check on file123_mixed_copy3 [26]@or_broken@Skipping file size check on NT4
1212 Passed: file size check on file123_mixed_copy4 [25]@or_broken@Skipping file size check on NT4
1213 Passed: file size check on file123_mixed_copy5 [28]@or_broken@Skipping file size check on NT4
1214 Passed: file size check on file123_mixed_copy6 [19]@or_broken@Skipping file size check on NT4
1215 Passed: file size check on file123_mixed_copy7 [6]@or_broken@Skipping file size check on NT4
1216 Passed: file size check on file123_mixed_copy8 [7]@or_broken@Skipping file size check on NT4
1217 Passed: errorlevel invalid check 1
1218 Passed: Did not find dir1\file1
1219 Passed: errorlevel invalid check 2
1220 Passed: errorlevel invalid check 3
1221 ------------ Testing setlocal/endlocal ------------
1222 --- enable/disable extensions
1223 @todo_wine@ErrLev:@space@
1224 ErrLev: 0
1225 ErrLev: 0
1226 @todo_wine@ErrLev:@space@@or_broken@ErrLev: 0
1227 ErrLev: 0
1228 --- setlocal with corresponding endlocal
1229 globalval
1230 localval
1231 @pwd@\foobar\foobar2
1232 globalval
1233 @pwd@\foobar
1234 globalval
1235 @pwd@\foobar
1236 --- setlocal with no corresponding endlocal
1237 globalval
1238 localval
1239 @pwd@\foobar\foobar2
1240 globalval
1241 @pwd@\foobar
1242 --- setlocal within same batch program
1243 Var1 ok 1
1244 Var2 ok 2
1245 Var3 ok 3
1246 Directory is ok 1
1247 Var1 ok 1
1248 Var2 ok 2
1249 Var3 ok 3
1250 Directory is ok 2
1251 Var1 ok 1
1252 Var2 ok 2
1253 Var3 ok 3
1254 Directory is ok 3
1255 --- Mismatched set and end locals
1256 --- Extra setlocal in called batch
1257 value2
1258 2set1endvalue1
1259 @pwd@\foobar\foodir3
1260 Finished:
1261 value2
1262 @pwd@\foobar\foodir2
1263 value1
1264 @pwd@\foobar
1265 --- Extra endlocal in called batch
1266 value2
1267 value2
1268 @pwd@\foobar\foodir2
1269 value2
1270 @pwd@\foobar\foodir2
1271 Finished:
1272 value2
1273 @pwd@\foobar\foodir2
1274 value1
1275 @pwd@\foobar
1276 --- endlocal in called function rather than batch pgm is ineffective
1277 2
1278 2
1279 1
1280 2
1281 1
1282 2
1283 1
1284 1
1285 ------------ Testing Errorlevel ------------
1286 9009
1287 1
1288 errorlevel just right, good
1289 errorlevel with leading zero just right, good
1290 errorlevel with negative number OK
1291 abc0def@or_broken@abc1def
1292 errorlevel zero, good@or_broken@errorlevel nonzero, bad
1293 7 should be 7
1294 7 should still be 7
1295 ------------ Testing GOTO ------------
1296 goto with no leading space worked
1297 goto with a leading space worked
1298 goto with a leading tab worked
1299 goto with a following space worked
1300 ------------ Testing PATH ------------
1301 PATH=original
1302 PATH=try2
1303 PATH=try3
1304 ------------ Testing combined CALLs/GOTOs ------------
1305 world
1306 cheball
1307 barbare
1308 bar
1309 foo
1310 baz
1311 cheball
1312 barbare