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