mshtml: Properly report history update for location.replace call.
[wine] / programs / cmd / tests / 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 FOO=bar | baz
224 0
225 FOO=bar ^| baz
226 bar | baz
227 0
228 ------------ Testing 'set' ------------
229 1
230 0
231 FOOBAR not defined
232   baz
233 FOOBAR =  baz
234 0
235   baz2
236 0
237  bar
238 FOOBAR= bar
239 FOOBAR =  baz2
240 FOOBAR =  baz2
241 FOOBAR not defined
242 1
243 bar
244 foobar
245 FOO not defined
246 BAZ=bazbaz
247 bazbaz
248 set "FOO=bar" should not include the quotes in the variable value
249 bar
250 foo
251 ''
252 'foo@space@'
253 'foo@tab@'
254 ------------ Testing variable expansion ------------
255 ~dp0 should be directory containing batch file
256 @pwd@\
257 @pwd@\
258 CD value @pwd@@or_broken@CD value@space@
259 %
260 P
261 P
262 S
263 P
264 PS
265 ERRORLEVEL
266 0
267 00
268 0ERRORLEVEL
269 0
270 0%
271 P0
272 0S
273 P0S
274 ------------ Testing variable substrings ------------
275 q
276 qwe
277 er
278 'ty'@or_broken@''
279 't'@or_broken@''
280 ert@or_broken@qwerty
281 e@or_broken@qwerty
282 ''@or_broken@'qwerty'
283 r@or_broken@qwerty
284 ------------ Testing variable substitution ------------
285 --- in FOR variables
286 "A B"
287 C
288 "A B"
289 C
290 'A B'@or_broken@''
291 'C'@or_broken@''
292 @pwd@\C D@or_broken@%~ff
293 @pwd@\E@or_broken@%~ff
294 @drive@
295 @drive@
296 @path@@or_broken@%~pd
297 @path@@or_broken@%~pd
298 L M
299 N
300 '.OOL'
301 '.TABC'
302 ''
303 @todo_wine@'@drive@@shortpath@R S'@or_broken@''
304 @todo_wine@'@drive@@shortpath@T'@or_broken@''
305 @todo_wine@'@drive@@shortpath@ABCDEFGHIJK.LMNOP'@or_broken@''
306 ''@or_broken@'%~ai'
307 ''@or_broken@'%~ai'
308 '--a------'@or_broken@'%~ai'
309 '5'@or_broken@'%~zi'
310 ''@or_broken@'%~ti'
311 ''@or_broken@'%~ti'
312 ''@or_broken@'%~zi'
313 ''@or_broken@'%~zi'
314 @drive@@path@
315 @drive@@path@
316 @drive@
317 @drive@
318 @drive@
319 @drive@
320 ''
321 '.eh'
322 --- in parameters
323 "A B"
324 C
325 'A B'@or_broken@''
326 'C'@or_broken@''
327 @pwd@\C D
328 @pwd@\E
329 @drive@
330 @drive@
331 @path@
332 @path@
333 L M
334 N
335 '.OOL'
336 '.TABC'
337 ''
338 @todo_wine@'@drive@@shortpath@R S'@or_broken@''
339 @todo_wine@'@drive@@shortpath@T'@or_broken@''
340 @todo_wine@'@drive@@shortpath@ABCDEFGHIJK.LMNOP'@or_broken@''
341 @drive@@path@
342 @drive@@path@
343 @drive@
344 @drive@
345 @drive@
346 @drive@
347 ''
348 '.eh'@or_broken@''
349 ------------ Testing variable delayed expansion ------------
350 --- default mode (load-time expansion)
351 foo
352 !FOO!
353 foo
354 foo
355 --- runtime (delayed) expansion mode
356 foo
357 @todo_wine@foo@or_broken@!FOO!
358 foo
359 @todo_wine@bar@or_broken@foo
360 0
361 0@or_broken@1
362 foo
363 !FOO!
364 --- using /V cmd flag
365 foo
366 @todo_wine@foo@or_broken@!FOO!
367 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 ------------
401
402 @pwd@>type foobaz@space@
403 bar
404
405 @pwd@>echo ---@space@
406 ---
407 bar
408 ---1
409 bar
410 ---2
411 bar
412 ---3
413 ------------ Testing NUL ------------
414 bar
415 bar
416 bar
417 NUL
418 @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
437 lol
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 A LSS AB
450 A LSS BA
451 A LSS AA
452 B LSS BA
453 AB LSS B
454 AB LSS BA
455 AA LSS B
456 AA LSS AB
457 AA LSS BA
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 A LEQ AB
466 A LEQ BA
467 A LEQ AA
468 B LEQ B
469 B LEQ BA
470 AB LEQ B
471 AB LEQ AB
472 AB LEQ BA
473 BA LEQ BA
474 AA LEQ B
475 AA LEQ AB
476 AA LEQ BA
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 A EQU A
485 B EQU B
486 AB EQU AB
487 BA EQU BA
488 AA EQU AA
489 A EQU a insensitive
490 A NEQ B
491 A NEQ AB
492 A NEQ BA
493 A NEQ AA
494 B NEQ A
495 B NEQ AB
496 B NEQ BA
497 B NEQ AA
498 AB NEQ A
499 AB NEQ B
500 AB NEQ BA
501 AB NEQ AA
502 BA NEQ A
503 BA NEQ B
504 BA NEQ AB
505 BA NEQ AA
506 AA NEQ A
507 AA NEQ B
508 AA NEQ AB
509 AA NEQ BA
510 A GEQ A
511 B GEQ A
512 B GEQ B
513 B GEQ AB
514 B GEQ AA
515 AB GEQ A
516 AB GEQ AB
517 AB GEQ AA
518 BA GEQ A
519 BA GEQ B
520 BA GEQ AB
521 BA GEQ BA
522 BA GEQ AA
523 AA GEQ A
524 AA GEQ AA
525 B GTR A
526 B GTR AB
527 B GTR AA
528 AB GTR A
529 AB GTR AA
530 BA GTR A
531 BA GTR B
532 BA GTR AB
533 BA GTR AA
534 AA GTR A
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 0 LSS 9
546 1 LSS 10
547 1 LSS 9
548 9 LSS 10
549 0 LEQ 0
550 0 LEQ 1
551 0 LEQ 10
552 0 LEQ 9
553 1 LEQ 1
554 1 LEQ 10
555 1 LEQ 9
556 10 LEQ 10
557 9 LEQ 10
558 9 LEQ 9
559 0 EQU 0
560 1 EQU 1
561 10 EQU 10
562 9 EQU 9
563 octal ok
564 hexa ok
565 string/hexa compare ok
566 string/hexa compare ok
567 0 NEQ 1
568 0 NEQ 10
569 0 NEQ 9
570 1 NEQ 0
571 1 NEQ 10
572 1 NEQ 9
573 10 NEQ 0
574 10 NEQ 1
575 10 NEQ 9
576 9 NEQ 0
577 9 NEQ 1
578 9 NEQ 10
579 0 GEQ 0
580 1 GEQ 0
581 1 GEQ 1
582 10 GEQ 0
583 10 GEQ 1
584 10 GEQ 10
585 10 GEQ 9
586 9 GEQ 0
587 9 GEQ 1
588 9 GEQ 9
589 1 GTR 0
590 10 GTR 0
591 10 GTR 1
592 10 GTR 9
593 9 GTR 0
594 9 GTR 1
595 ------ for numbers and stringified numbers
596 strings and integers not equal
597 strings and integers not equal
598 foo
599 "10" GEQ "1"
600 '1' GEQ 1@or_broken@NT4
601 1 GEQ "1"
602 "1" GEQ "1"
603 '1' GEQ "1"
604 "10" GEQ "1"
605 non NT4@or_broken@1 GEQ '1'
606 '1' GEQ '1'
607 foo
608 1 GEQ "10"
609 foo
610 '1' GEQ "10"
611 "10" GEQ "10"
612 ------------ Testing for ------------
613 --- plain FOR
614 A
615 B
616 C
617 %I
618 %I
619 %I
620 %j
621 %j
622 %j
623 A
624 B
625 C
626 1
627 4
628 1
629 A
630 B
631 C
632 X
633 X2
634 X3
635 foo
636 M
637 X
638 M
639 N
640 O
641 `echo
642 A
643 B`
644 'echo
645 A
646 B'
647 "echo A B"
648 "A B"
649 C
650 --- imbricated FORs
651 X Y
652 X Y
653 A C
654 A D
655 B C
656 B D
657 A C
658 A D
659 B C
660 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
681 1
682 3
683 5
684 1
685 3
686 5
687 0
688 2
689 1
690 -1
691 ErrorLevel 0
692 ErrorLevel 0
693 1
694 2
695 3
696 4
697 1
698 3
699 4
700 3
701 2
702 1
703 4
704 2
705 0
706 1
707 1
708 -1
709 -1
710 1
711 3
712 --- for /a
713 ------ individual operations
714 0
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
723 0
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
734 0
735 @todo_wine@-1
736 @todo_wine@-3
737 0
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
772 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
779 0
780 @todo_wine@5@or_broken@0
781
782 --- for /F
783 ------ string argument
784 a
785 a@or_broken@no output
786 a
787 a@or_broken@no output
788 a
789 a@or_broken@no output
790 a
791 a@or_broken@no output
792 a
793 a@or_broken@no output
794 ------ fileset argument
795 --------- basic blank handling
796 a
797 a
798 a
799 a
800 a
801 b
802 --------- multi-line with empty lines
803 a
804 b
805 c
806 --------- multiple files
807 a
808 b
809 c
810 q
811 kkk
812 q
813 kkk
814 a
815 b
816 c
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
825 ad
826 z@y
827 a|d
828 no output
829 no output
830 ------ delims option
831 a
832 a@space@
833 a d
834 a
835 C r
836 foo bar baz
837 @todo_wine@c:\
838 ------ skip option
839 c
840 no output
841 no output
842 c
843 c
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
858 foo
859 bar
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
881 foo
882 bar2
883 foo2
884 ------------ Testing mkdir ------------
885 --- md and mkdir are synonymous
886 0
887 0
888 --- creating an already existing directory/file must fail
889 1
890 1
891 --- multilevel path creation
892 0
893 0
894 0
895 0
896 0
897 1
898 0
899 0
900 --- trailing backslashes
901 0
902 dir created
903 0
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 ------------
921 0
922 dir removed
923 0
924 dir removed
925 0
926 0
927 file not removed
928 0
929 non-empty dir not removed
930 0
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
957 foo
958 foo original contents
959 Read-only file not deleted
960 Read-only file forcibly deleted
961 --- recursive behaviour
962 A            @pwd@\foobar\baz\level2@or_broken@A          @pwd@\foobar\baz\level2@or_broken@A       I    @pwd@\foobar\baz\level2
963 A    R       @pwd@\foobar\level1@or_broken@A    R     @pwd@\foobar\level1@or_broken@A    R  I    @pwd@\foobar\level1
964 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 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
975 ---
976 .foo=bar
977 .foo=bar
978 +++
979 .foo=bar
980 --- resetting association
981 ---
982 +++
983 ---
984 ------------ Testing ftype ------------
985 --- setting association
986 ---
987 footype=foo_opencmd
988 .foo=footype
989 footype=foo_opencmd
990 +++
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
1013 0
1014 foo created
1015 Should expand foobaz
1016 batfile
1017 robinfile
1018 1
1019 1
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
1152 2
1153 2
1154 1
1155 2
1156 1
1157 2
1158 1
1159 1
1160 ------------ Testing Errorlevel ------------
1161 9009
1162 1
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
1183 bar
1184 foo
1185 baz
1186 cheball
1187 barbare