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