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