cmd: Add support for LEQ comparison operator in if statements.
[wine/wine-gecko.git] / programs / cmd / tests / test_builtins.cmd.exp
blobec85db686ce23fb50e0f7fdc8c951dc243a90f52
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 FOO=bar | baz
225 FOO=bar ^| baz
226 bar | baz
228 ------------ Testing 'set' ------------
231 FOOBAR not defined
233 FOOBAR = baz
235 baz2
238 FOOBAR= bar
239 FOOBAR = baz2
240 FOOBAR = baz2
241 FOOBAR not defined
244 foobar
245 FOO not defined
246 BAZ=bazbaz
247 bazbaz
248 set "FOO=bar" should not include the quotes in the variable value
252 'foo@space@'
253 'foo@tab@'
254 ------------ Testing variable expansion ------------
255 ~dp0 should be directory containing batch file
256 @pwd@\
257 @pwd@\
258 CD value @pwd@@or_broken@CD value@space@
265 ERRORLEVEL
268 0ERRORLEVEL
274 ------------ Testing variable substrings ------------
278 @todo_wine@'ty'@or_broken@''
279 't'@or_broken@''
280 ert@or_broken@qwerty
281 e@or_broken@qwerty
282 ''@or_broken@'qwerty'
283 r@or_broken@qwerty
284 ------------ Testing variable substitution ------------
285 --- in FOR variables
286 "A B"
288 "A B"
290 'A B'@or_broken@''
291 'C'@or_broken@''
292 @pwd@\C D@or_broken@%~ff
293 @pwd@\E@or_broken@%~ff
294 @drive@
295 @drive@
296 @path@@or_broken@%~pd
297 @path@@or_broken@%~pd
300 '.OOL'
301 '.TABC'
303 @todo_wine@'@drive@@shortpath@R S'@or_broken@''
304 @todo_wine@'@drive@@shortpath@T'@or_broken@''
305 @todo_wine@'@drive@@shortpath@ABCDEFGHIJK.LMNOP'@or_broken@''
306 ''@or_broken@'%~ai'
307 ''@or_broken@'%~ai'
308 '--a------'@or_broken@'%~ai'
309 '5'@or_broken@'%~zi'
310 ''@or_broken@'%~ti'
311 ''@or_broken@'%~ti'
312 ''@or_broken@'%~zi'
313 ''@or_broken@'%~zi'
314 @drive@@path@
315 @drive@@path@
316 @drive@
317 @drive@
318 @drive@
319 @drive@
321 '.eh'
322 --- in parameters
323 "A B"
325 'A B'@or_broken@''
326 'C'@or_broken@''
327 @pwd@\C D
328 @pwd@\E
329 @drive@
330 @drive@
331 @path@
332 @path@
335 '.OOL'
336 '.TABC'
338 @todo_wine@'@drive@@shortpath@R S'@or_broken@''
339 @todo_wine@'@drive@@shortpath@T'@or_broken@''
340 @todo_wine@'@drive@@shortpath@ABCDEFGHIJK.LMNOP'@or_broken@''
341 @drive@@path@
342 @drive@@path@
343 @drive@
344 @drive@
345 @drive@
346 @drive@
348 '.eh'@or_broken@''
349 ------------ Testing variable delayed expansion ------------
350 --- default mode (load-time expansion)
352 !FOO!
355 --- runtime (delayed) expansion mode
357 @todo_wine@foo@or_broken@!FOO!
359 @todo_wine@bar@or_broken@foo
361 0@or_broken@1
363 !FOO!
364 --- using /V cmd flag
366 @todo_wine@foo@or_broken@!FOO!
368 !FOO!
369 ------------ Testing conditional execution ------------
370 --- unconditional ampersand
371 foo1
372 bar2@space@
373 foo2
374 foobar deleted
375 --- on success conditional and
376 @todo_wine@foo3 not created
377 bar4@space@
378 foo4
379 --- on failure conditional or
380 foo5
381 foo6@space@
382 @todo_wine@------------ Testing cd ------------
383 singleFile
384 Current dir: @pwd@\foobar@or_broken@Current dir:@space@
385 @pwd@\foobar
386 @pwd@
387 @pwd@\foobar
388 @pwd@
389 @pwd@\foobar
390 @pwd@
391 @pwd@
392 @pwd@
393 @pwd@\foobar\bar bak
394 @pwd@\foobar\bar bak
395 @pwd@\foobar\bar bak
396 @pwd@\foobar\bar bak
397 @pwd@\foobar\bar bak
398 @pwd@
399 @pwd@\foobar
400 ------------ Testing type ------------
402 @pwd@>type foobaz@space@
405 @pwd@>echo ---@space@
408 ---1
410 ---2
412 ---3
413 ------------ Testing NUL ------------
418 @todo_wine@foo created
419 ------------ Testing if/else ------------
420 --- if/else should work with blocks
421 if seems to work
422 else seems to work
423 if seems not to detect /c as parameter
424 --- case sensitivity with and without /i option
425 if seems to default to case sensitivity
426 if /i seems to work
427 if /I seems to work
428 --- string comparisons
429 equal
430 non equal
431 non equal
432 equal
433 --- tabs handling
434 doom
435 doom
436 doom
438 quake
439 quake
440 quake
441 --- comparison operators
442 ------ for strings
443 LSS string can be used as operand for LSS comparison
444 floats are handled as strings
445 numbers in quotes are handled as strings
446 negative numbers as well@or_broken@NT4
447 if /i seems to work for LSS
448 A LSS B
449 AB LSS B
450 AA LSS B
451 A LSS AB
452 AA LSS AB
453 A LSS BA
454 B LSS BA
455 AB LSS BA
456 AA LSS BA
457 A LSS AA
458 b LSS B@or_broken@NT4
459 a LSS B@or_broken@NT4
460 a LSS B insensitive
461 A LSS b
462 A LSS b insensitive
463 A LEQ A
464 A LEQ B
465 B LEQ B
466 AB LEQ B
467 AA LEQ B
468 A LEQ AB
469 AB LEQ AB
470 AA LEQ AB
471 A LEQ BA
472 B LEQ BA
473 AB LEQ BA
474 BA LEQ BA
475 AA LEQ BA
476 A LEQ AA
477 AA LEQ AA
478 b LEQ B@or_broken@NT4
479 b LEQ B insensitive
480 a LEQ B@or_broken@NT4
481 a LEQ B insensitive
482 A LEQ b
483 A LEQ b insensitive
484 @todo_wine@A EQU A
485 @todo_wine@B EQU B
486 @todo_wine@AB EQU AB
487 @todo_wine@BA EQU BA
488 @todo_wine@AA EQU AA
489 @todo_wine@A EQU a insensitive
490 @todo_wine@B NEQ A
491 @todo_wine@AB NEQ A
492 @todo_wine@BA NEQ A
493 @todo_wine@AA NEQ A
494 @todo_wine@A NEQ B
495 @todo_wine@AB NEQ B
496 @todo_wine@BA NEQ B
497 @todo_wine@AA NEQ B
498 @todo_wine@A NEQ AB
499 @todo_wine@B NEQ AB
500 @todo_wine@BA NEQ AB
501 @todo_wine@AA NEQ AB
502 @todo_wine@A NEQ BA
503 @todo_wine@B NEQ BA
504 @todo_wine@AB NEQ BA
505 @todo_wine@AA NEQ BA
506 @todo_wine@A NEQ AA
507 @todo_wine@B NEQ AA
508 @todo_wine@AB NEQ AA
509 @todo_wine@BA NEQ AA
510 @todo_wine@A GEQ A
511 @todo_wine@B GEQ A
512 @todo_wine@AB GEQ A
513 @todo_wine@BA GEQ A
514 @todo_wine@AA GEQ A
515 @todo_wine@B GEQ B
516 @todo_wine@BA GEQ B
517 @todo_wine@B GEQ AB
518 @todo_wine@AB GEQ AB
519 @todo_wine@BA GEQ AB
520 @todo_wine@BA GEQ BA
521 @todo_wine@B GEQ AA
522 @todo_wine@AB GEQ AA
523 @todo_wine@BA GEQ AA
524 @todo_wine@AA GEQ AA
525 @todo_wine@B GTR A
526 @todo_wine@AB GTR A
527 @todo_wine@BA GTR A
528 @todo_wine@AA GTR A
529 @todo_wine@BA GTR B
530 @todo_wine@B GTR AB
531 @todo_wine@BA GTR AB
532 @todo_wine@B GTR AA
533 @todo_wine@AB GTR AA
534 @todo_wine@BA GTR AA
535 ------ for numbers
536 negative numbers handled
537 negative numbers handled
538 octal handled
539 also in negative form
540 hexa handled
541 also in negative form
542 11 LSS 101
543 0 LSS 1
544 0 LSS 10
545 1 LSS 10
546 9 LSS 10
547 0 LSS 9
548 1 LSS 9
549 0 LEQ 0
550 0 LEQ 1
551 1 LEQ 1
552 0 LEQ 10
553 1 LEQ 10
554 10 LEQ 10
555 9 LEQ 10
556 0 LEQ 9
557 1 LEQ 9
558 9 LEQ 9
559 @todo_wine@0 EQU 0
560 @todo_wine@1 EQU 1
561 @todo_wine@10 EQU 10
562 @todo_wine@9 EQU 9
563 @todo_wine@octal ok
564 @todo_wine@hexa ok
565 @todo_wine@string/hexa compare ok
566 @todo_wine@string/hexa compare ok
567 @todo_wine@1 NEQ 0
568 @todo_wine@10 NEQ 0
569 @todo_wine@9 NEQ 0
570 @todo_wine@0 NEQ 1
571 @todo_wine@10 NEQ 1
572 @todo_wine@9 NEQ 1
573 @todo_wine@0 NEQ 10
574 @todo_wine@1 NEQ 10
575 @todo_wine@9 NEQ 10
576 @todo_wine@0 NEQ 9
577 @todo_wine@1 NEQ 9
578 @todo_wine@10 NEQ 9
579 @todo_wine@0 GEQ 0
580 @todo_wine@1 GEQ 0
581 @todo_wine@10 GEQ 0
582 @todo_wine@9 GEQ 0
583 @todo_wine@1 GEQ 1
584 @todo_wine@10 GEQ 1
585 @todo_wine@9 GEQ 1
586 @todo_wine@10 GEQ 10
587 @todo_wine@10 GEQ 9
588 @todo_wine@9 GEQ 9
589 @todo_wine@1 GTR 0
590 @todo_wine@10 GTR 0
591 @todo_wine@9 GTR 0
592 @todo_wine@10 GTR 1
593 @todo_wine@9 GTR 1
594 @todo_wine@10 GTR 9
595 ------ for numbers and stringified numbers
596 strings and integers not equal
597 strings and integers not equal
599 @todo_wine@"10" GEQ "1"
600 @todo_wine@'1' GEQ 1@or_broken@NT4
601 @todo_wine@1 GEQ "1"
602 @todo_wine@"1" GEQ "1"
603 @todo_wine@'1' GEQ "1"
604 @todo_wine@"10" GEQ "1"
605 @todo_wine@non NT4@or_broken@1 GEQ '1'
606 @todo_wine@'1' GEQ '1'
607 @todo_wine@foo
608 @todo_wine@1 GEQ "10"
609 @todo_wine@foo
610 @todo_wine@'1' GEQ "10"
611 @todo_wine@"10" GEQ "10"
612 ------------ Testing for ------------
613 --- plain FOR
641 `echo
644 'echo
647 "echo A B"
648 "A B"
650 --- imbricated FORs
651 @todo_wine@X Y
652 @todo_wine@X Y
653 @todo_wine@A C
654 @todo_wine@A D
655 @todo_wine@B C
656 @todo_wine@B D
657 @todo_wine@A C
658 @todo_wine@A D
659 @todo_wine@B C
660 @todo_wine@B D
661 --- basic wildcards
662 bazbaz
663 --- for /d
664 baz@space@
665 foo@space@
666 bar@space@
667 PASSED
668 xxx - Should be xxx
669 Expected second line
670 --- for /R
671 Plain directory enumeration
672 Plain directory enumeration from provided root
673 File enumeration
674 File enumeration from provided root
675 Mixed enumeration
676 Mixed enumeration from provided root
677 With duplicates enumeration
678 Strip missing wildcards, keep unwildcarded names
679 for /R passed
680 --- for /L
691 ErrorLevel 0
692 ErrorLevel 0
712 --- for /a
713 ------ individual operations
715 @todo_wine@3
716 @todo_wine@-1
717 @todo_wine@3
718 @todo_wine@6
719 @todo_wine@10
720 @todo_wine@4
721 @todo_wine@4
722 @todo_wine@-4
724 @todo_wine@2
725 @todo_wine@2
726 @todo_wine@-2
727 @todo_wine@1
728 @todo_wine@4
729 0@or_broken@1073741824
730 0@or_broken@-1073741824
731 @todo_wine@-4
732 @todo_wine@9
733 @todo_wine@2
735 @todo_wine@-1
736 @todo_wine@-3
738 @todo_wine@1
739 @todo_wine@1
740 @todo_wine@4
741 @todo_wine@1
742 @todo_wine@5
743 @todo_wine@5
744 @todo_wine@7
745 @todo_wine@5
746 @todo_wine@5
747 @todo_wine@5
748 @todo_wine@4
749 @todo_wine@6
750 @todo_wine@1
751 ------ precedence and grouping
752 @todo_wine@4
753 @todo_wine@10
754 @todo_wine@18@or_broken@10
755 @todo_wine@2@or_broken@0
756 @todo_wine@2@or_broken@0
757 0@or_broken@4
758 @todo_wine@4
759 @todo_wine@3@or_broken@4
760 ------ octal and hexadecimal
761 @todo_wine@3@or_broken@4
762 @todo_wine@18
763 @todo_wine@18
764 @todo_wine@15
765 ------ variables
766 @todo_wine@3
767 @todo_wine@3@or_broken@foo not defined
768 @todo_wine@3@or_broken@0
769 @todo_wine@3@or_broken@0
770 @todo_wine@3@or_broken@0
771 @todo_wine@9@or_broken@0
773 @todo_wine@4@or_broken@0
774 @todo_wine@-7@or_broken@0
775 @todo_wine@-1@or_broken@0
776 @todo_wine@5@or_broken@0
777 @todo_wine@4@or_broken@0
778 @todo_wine@1@or_broken@0
780 @todo_wine@5@or_broken@0
782 --- for /F
783 ------ string argument
785 a@or_broken@no output
787 a@or_broken@no output
789 a@or_broken@no output
791 a@or_broken@no output
793 a@or_broken@no output
794 ------ fileset argument
795 --------- basic blank handling
802 --------- multi-line with empty lines
806 --------- multiple files
817 ------ command argument
818 Passed1@or_broken@Missing functionality - Broken1
819 Passed2@or_broken@Missing functionality - Broken2
820 Passed3@or_broken@Missing functionality - Broken3
821 ------ eol option
822 and@or_broken@Broken NT4 functionality1
823 Line@or_broken@Broken NT4 functionality2
824 Line@or_broken@Broken NT4 functionality3
828 no output
829 no output
830 ------ delims option
832 a@space@
836 foo bar baz
837 @todo_wine@c:\
838 ------ skip option
840 no output
841 no output
844 no output
845 ------------ Testing del /a ------------
846 not-r.test not found after delete, good
847 r.test found before delete, good
848 r.test not found after delete, good
849 ------------ Testing del /q ------------
850 del /q * succeeded on file1
851 del /q * succeeded on file2.dat
852 ------------ Testing del /s ------------
853 ------------ Testing rename ------------
854 --- ren and rename are synonymous
855 foo renamed to bar
856 bar renamed to foo
857 --- name collision
860 --- rename read-only files
861 read-only file renamed
862 --- rename directories
863 dir renamed
864 read-only dir renamed
865 --- rename in other directory
866 rename impossible in other directory
867 original file still present
868 ------------ Testing move ------------
869 --- file move
870 file move succeeded
871 @todo_wine@file move with overwrite succeeded@or_broken@file overwrite impossible!
872 @todo_wine@bar@or_broken@baz
873 read-only files are moveable
874 file moved in subdirectory
875 @todo_wine@moving a file to itself is a no-op@or_broken@moving a file to itself should be a no-op!
876 @todo_wine@ErrorLevel: 0@or_broken@ErrorLevel: 1
877 --- directory move
878 simple directory move succeeded
879 moving a directory to itself gives error; errlevel 1
880 ------ dir in dir move
882 bar2
883 foo2
884 ------------ Testing mkdir ------------
885 --- md and mkdir are synonymous
888 --- creating an already existing directory/file must fail
891 --- multilevel path creation
900 --- trailing backslashes
902 dir created
904 --- invalid chars
905 mkdir ? gives errorlevel 1
906 mkdir ?\foo gives errorlevel 1
907 mkdir foo\? gives errorlevel 1
908 ok, foo created
909 mkdir foo\bar\? gives errorlevel 1
910 ok, foo\bar created
911 --- multiple directories at once
912 foo created
913 bar created
914 foobar created
915 bar\baz created
916 bazbaz created
917 zabzab created
918 mkdir foo\* errorlevel 1
919 ok, foo created
920 ------------ Testing rmdir ------------
922 dir removed
924 dir removed
927 file not removed
929 non-empty dir not removed
931 non-empty dir not removed
932 recursive rmdir succeeded
933 recursive rmdir succeeded
934 foo removed
935 bar removed
936 foobar removed
937 bar\baz removed
938 ------------ Testing pushd/popd ------------
939 @pwd@
940 --- popd is no-op when dir stack is empty
941 @pwd@
942 --- pushing non-existing dir
943 @pwd@
944 --- basic behaviour
945 @pwd@\foobar
946 @pwd@
947 @pwd@\foobar\baz
948 @pwd@\foobar
949 @pwd@\foobar
950 @pwd@
951 @pwd@\foobar
952 @pwd@
953 ------------ Testing attrib ------------
954 A @pwd@\foobar\foo@or_broken@A @pwd@\foobar\foo@or_broken@A I @pwd@\foobar\foo
955 --- read-only attribute
956 A R @pwd@\foobar\foo@or_broken@A R @pwd@\foobar\foo@or_broken@A R I @pwd@\foobar\foo
958 foo original contents
959 Read-only file not deleted
960 Read-only file forcibly deleted
961 --- recursive behaviour
962 @todo_wine@A @pwd@\foobar\baz\level2@or_broken@A @pwd@\foobar\baz\level2@or_broken@A I @pwd@\foobar\baz\level2
963 @todo_wine@A R @pwd@\foobar\level1@or_broken@A R @pwd@\foobar\level1@or_broken@A R I @pwd@\foobar\level1
964 @todo_wine@A R @pwd@\foobar\baz\level2@or_broken@A R @pwd@\foobar\baz\level2@or_broken@A R I @pwd@\foobar\baz\level2
965 A @pwd@\foobar\bar@or_broken@A @pwd@\foobar\bar@or_broken@A I @pwd@\foobar\bar
966 --- folders processing
967 @pwd@\foobar@or_broken@ @pwd@\foobar@or_broken@ I @pwd@\foobar
968 @todo_wine@ R @pwd@\foobar\baz@or_broken@ R @pwd@\foobar\baz@or_broken@ @pwd@\foobar\baz@or_broken@ R I @pwd@\foobar\baz
969 @todo_wine@A @pwd@\foobar\baz\toto@or_broken@A @pwd@\foobar\baz\toto@or_broken@A I @pwd@\foobar\baz\toto
970 toto
971 lulu
972 file created in read-only dir
973 ------------ Testing assoc ------------
974 --- setting association
976 .foo=bar
977 .foo=bar
979 .foo=bar
980 --- resetting association
984 ------------ Testing ftype ------------
985 --- setting association
987 footype=foo_opencmd
988 .foo=footype
989 footype=foo_opencmd
991 footype=foo_opencmd
992 --- resetting association
993 @todo_wine@original value@or_broken@buggyXP@or_broken@!FOO!
994 ------------ Testing CALL ------------
995 --- external script
996 foo@space@
997 foo 8
998 foo@space@@space@
999 foo bar@space@
1000 foo ""@space@
1001 "" bar@space@
1002 foo ''@space@
1003 '' bar@space@
1004 --- internal routines
1005 bar :testRoutine
1006 foo@space@
1007 foo bar
1008 foo ""
1009 "" bar
1010 foo ''
1011 '' bar
1012 --- with builtins
1014 foo created
1015 Should expand foobaz
1016 batfile
1017 robinfile
1020 non-builtin dir
1021 Line one
1022 Line two
1023 Get if
1024 ... and else!
1025 passed
1026 ------------ Testing SHIFT ------------
1027 'p1' 'p2' 'p3' 'p4' 'p5'
1028 'p2' 'p3' 'p4' 'p5' ''
1029 'p3' 'p4' 'p5' '' ''
1030 'p3' 'p5' '' '' ''
1031 'p3' 'p5' '' '' ''
1032 'p5' '' '' '' ''
1033 ------------ Testing cmd invocation ------------
1034 --- a batch file can delete itself
1035 file correctly deleted
1036 --- a batch file can alter itself
1037 @todo_wine@bar
1038 ---------- Testing copy
1039 Passed: Found expected dummy.file
1040 Passed: Found expected dir1\file1
1041 Passed: Found expected dir1\file1
1042 Passed: Found expected dir1\file99
1043 Passed: Found expected file1
1044 Passed: Did not find dir2
1045 Passed: Did not find dir2\file1
1046 Passed: Found expected dir1\file1
1047 Passed: Found expected dir1\file2
1048 Passed: Found expected dir1\file3
1049 Passed: Found expected dir1\file1
1050 Passed: Found expected dir1\file2
1051 Passed: Found expected dir1\file3
1052 Passed: Found expected file1
1053 Passed: Found expected file2
1054 Passed: Found expected file3
1055 Passed: Did not find dir2
1056 Passed: Did not find dir2\file1
1057 Passed: Did not find dir2\file2
1058 Passed: Did not find dir2\file3
1059 Passed: Found expected testfile
1060 Passed: Found expected testfile
1061 Passed: Found expected testfile
1062 Passed: Found expected testfile
1063 Passed: Found expected testfile
1064 Passed: Found expected dir1\fred
1065 Passed: Found expected dir1\fred
1066 Passed: Found expected fred
1067 Passed: Found expected fred
1068 Passed: file size check on file1 [5]@or_broken@Skipping file size check on NT4
1069 Passed: file size check on file2 [8]@or_broken@Skipping file size check on NT4
1070 Passed: file size check on file3 [11]@or_broken@Skipping file size check on NT4
1071 Passed: file size check on file1_default [5]@or_broken@Skipping file size check on NT4
1072 Passed: file size check on file1_default2 [5]@or_broken@Skipping file size check on NT4
1073 Passed: file size check on file1_plus_eof [6]@or_broken@Skipping file size check on NT4
1074 Passed: file size check on file2_plus_eof [9]@or_broken@Skipping file size check on NT4
1075 Passed: file size check on file3_plus_eof [12]@or_broken@Skipping file size check on NT4
1076 Passed: file size check on file12_plus_eof [14]@or_broken@Skipping file size check on NT4
1077 Passed: file size check on file12_no_eof [13]@or_broken@Skipping file size check on NT4
1078 Passed: file size check on file12_eof2 [14]@or_broken@Skipping file size check on NT4
1079 Passed: file size check on file1_binary_srccopy [6]@or_broken@Skipping file size check on NT4
1080 Passed: file size check on file1_ascii_srccopy [5]@or_broken@Skipping file size check on NT4
1081 Passed: file size check on file123_default_copy [25]@or_broken@Skipping file size check on NT4
1082 Passed: file size check on file123_ascii_copy [25]@or_broken@Skipping file size check on NT4
1083 Passed: file size check on file123_binary_copy [27]@or_broken@Skipping file size check on NT4
1084 Passed: file size check on file123_mixed_copy1 [26]@or_broken@Skipping file size check on NT4
1085 Passed: file size check on file123_mixed_copy2 [27]@or_broken@Skipping file size check on NT4
1086 Passed: file size check on file123_mixed_copy3 [26]@or_broken@Skipping file size check on NT4
1087 Passed: file size check on file123_mixed_copy4 [25]@or_broken@Skipping file size check on NT4
1088 Passed: file size check on file123_mixed_copy5 [28]@or_broken@Skipping file size check on NT4
1089 Passed: file size check on file123_mixed_copy6 [19]@or_broken@Skipping file size check on NT4
1090 Passed: file size check on file123_mixed_copy7 [6]@or_broken@Skipping file size check on NT4
1091 Passed: file size check on file123_mixed_copy8 [7]@or_broken@Skipping file size check on NT4
1092 Passed: errorlevel invalid check 1
1093 Passed: Did not find dir1\file1
1094 Passed: errorlevel invalid check 2
1095 Passed: errorlevel invalid check 3
1096 ------------ Testing setlocal/endlocal ------------
1097 --- enable/disable extensions
1098 @todo_wine@ErrLev:@space@
1099 ErrLev: 0
1100 ErrLev: 0
1101 @todo_wine@ErrLev:@space@@or_broken@ErrLev: 0
1102 ErrLev: 0
1103 --- setlocal with corresponding endlocal
1104 globalval
1105 localval
1106 @pwd@\foobar\foobar2
1107 globalval
1108 @pwd@\foobar
1109 globalval
1110 @pwd@\foobar
1111 --- setlocal with no corresponding endlocal
1112 globalval
1113 localval
1114 @pwd@\foobar\foobar2
1115 globalval
1116 @pwd@\foobar
1117 --- setlocal within same batch program
1118 Var1 ok 1
1119 Var2 ok 2
1120 Var3 ok 3
1121 Directory is ok 1
1122 Var1 ok 1
1123 Var2 ok 2
1124 Var3 ok 3
1125 Directory is ok 2
1126 Var1 ok 1
1127 Var2 ok 2
1128 Var3 ok 3
1129 Directory is ok 3
1130 --- Mismatched set and end locals
1131 --- Extra setlocal in called batch
1132 value2
1133 2set1endvalue1
1134 @pwd@\foobar\foodir3
1135 Finished:
1136 value2
1137 @pwd@\foobar\foodir2
1138 value1
1139 @pwd@\foobar
1140 --- Extra endlocal in called batch
1141 value2
1142 value2
1143 @pwd@\foobar\foodir2
1144 value2
1145 @pwd@\foobar\foodir2
1146 Finished:
1147 value2
1148 @pwd@\foobar\foodir2
1149 value1
1150 @pwd@\foobar
1151 --- endlocal in called function rather than batch pgm is ineffective
1160 ------------ Testing Errorlevel ------------
1161 9009
1163 errorlevel just right, good
1164 errorlevel with leading zero just right, good
1165 errorlevel with negative number OK
1166 abc0def@or_broken@abc1def
1167 errorlevel zero, good@or_broken@errorlevel nonzero, bad
1168 7 should be 7
1169 7 should still be 7
1170 ------------ Testing GOTO ------------
1171 goto with no leading space worked
1172 goto with a leading space worked
1173 goto with a leading tab worked
1174 goto with a following space worked
1175 ------------ Testing PATH ------------
1176 PATH=original
1177 PATH=try2
1178 PATH=try3
1179 ------------ Testing combined CALLs/GOTOs ------------
1180 world
1181 cheball
1182 barbare
1186 cheball
1187 barbare