1
2@pwd@>echo Tests for cmd's builtin commands@space@
3Tests for cmd's builtin commands
4
5@pwd@>echo ------------ Testing 'echo' [ON] ------------@space@
6------------ Testing 'echo' [ON] ------------
7
8@pwd@>echo word@space@
9word
10
11@pwd@>echo 'singlequotedword'@space@
12'singlequotedword'
13
14@pwd@>echo "doublequotedword"@space@
15"doublequotedword"
16at-echoed-word
17
18@pwd@>echo "/?"@space@
19"/?"
20
21@pwd@>echo.
22
23
24@pwd@>echo .@space@
25.
26
27@pwd@>echo.word
28word
29
30@pwd@>echo .word@space@
31.word
32
33@pwd@>echo:
34
35
36@pwd@>echo :@space@
37:
38
39@pwd@>echo:word
40word
41
42@pwd@>echo :word@space@
43:word
44
45@pwd@>echo/
46
47
48@pwd@>echo /@space@
49/
50
51@pwd@>echo/word
52word
53
54@pwd@>echo /word@space@
55/word
56
57@pwd@>echo off now@space@
58off now
59
60@pwd@>echo word@space@@space@
61word@space@
62
63@pwd@>echo word@space@@space@@space@
64word@space@@space@
65
66@pwd@>echo word@space@
67word
68
69@pwd@>echo@tab@word@space@
70word
71
72@pwd@>echo@tab@word@space@@tab@@space@
73word@space@@tab@
74
75@pwd@>echo@tab@word@tab@@space@@space@
76word@tab@@space@
77
78@pwd@>echo word@space@
79word
80
81@pwd@>echo@space@@tab@word@space@
82@tab@word
83
84@pwd@>echo@space@@space@@tab@word@space@
85@space@@tab@word
86
87@pwd@>echo@tab@@tab@word@space@
88@tab@word
89
90@pwd@>echo @tab@ on @space@@space@
91--- @ with chains and brackets
92
93@todo_wine@@pwd@>(echo the @ character chains until  && )  && echo and can hide brackets  || ()  ||@space@
94@todo_wine@the @ character chains until
95@todo_wine@we leave the current depth
96@todo_wine@and can hide brackets
97@todo_wine@---
98noecho1
99noecho2
100echo3
101------------ Testing 'echo' [OFF] ------------
102word
103'singlequotedword'
104"doublequotedword"
105at-echoed-word
106"/?"
107
108.
109word
110.word
111
112:
113word
114:word
115
116/
117word
118/word
119on again
120word@space@
121word@space@@space@
122word
123word
124word@space@@tab@
125word@tab@@space@
126word
127@tab@word
128@space@@tab@word
129@tab@word
130------------ Testing mixed echo modes ------------
131@echo on
132if 1==1 echo foo
133if 1==1 @echo bar
134@echo off
135if 1==1 echo foo2
136if 1==1 @echo bar2
137
138@todo_wine@@pwd@>if 1 == 1 echo foo@space@
139foo
140
141@todo_wine@@pwd@>if 1 == 1@space@
142bar
143foo2
144bar2
145------------ Testing parameterization ------------
146'a', 'b', 'c'
147'"a b c"', '', ''
148'"a b"\c', '', ''
149'a', '~`+', '.{}!+b'
150'a', 'b', ''
151'"a;b"', '', ''
152'a', 'b', ''
153'a[b]{c}(d)e', '', ''
154'a', '', ''
155second line
156'a', 'b', 'c'
157'a', 'b', 'c'
158'a', 'b', ''
159------------ Testing rem ------------
160
161@pwd@>rem Hello@space@
162
163@pwd@>rem  Hello@space@
164
165@pwd@>rem   Hello || foo@space@
166
167@pwd@>rem echo lol@space@
168
169@pwd@>rem echo foo & echo bar@space@
170
171@pwd@>rem @tab@  Hello@space@
172
173@pwd@>rem@tab@  Hello@space@
174
175@pwd@>rem@tab@echo foo & echo bar@space@
176------------ Testing redirection operators ------------
177--- stdout redirection
178foo
179foo@space@
180foo@tab@
181foo@space@
182foo@tab@
183foo7@space@@or_broken@foo@tab@
184foo9@space@@or_broken@foo@tab@
185foo1
186foo11
187foo12
188foo13
189foo14
190foo15
191--- stdout appending
192foo
193foo@space@
194foob@space@
195foob@space@
196fooc@space@
197foob@space@
198fooc@space@
199food1
200foob@space@
201fooc@space@
202food1
203food2
204food21
205@todo_wine@foo7@space@@space@@or_broken@not supported@space@
206@todo_wine@foo@or_broken@not supported
207--- redirections within IF statements
208@todo_wine@foo1
209-----
210foo2
211foo3
212file does not exist, ok
213foo4
214baz5
215baz6@space@
216baz7
217baz8
218baz
219foo@space@
220baz
221foo
222A
223B
224C
225------------ Testing circumflex escape character ------------
226hello, world
227hello, world
228hell^o, world
229hell^o, world
230helloworld
231hello
232world
233hello
234
235finished
236baz
237baz
238foo | echo bar
239foo & echo bar
240bak &
241baz@space@
2420@or_broken@1
243foo > foo
244<
245ffoof
246WINE_FOO=bar | baz
2470
248WINE_FOO=bar ^| baz
249bar | baz
2500
251------------ Testing chains ------------
252--- chain success
253a1
254a2
255b1
256b2
257c1
258@todo_wine@---
259d1
260d2
261d3
262e1
263e2
264e3
265f1
266f2
267@todo_wine@---
268g1
269g2
270g3
271h1
272h2
273h3
274i1
275i2
276@todo_wine@---
277j1
278@todo_wine@j3
279@todo_wine@---
280k1
281@todo_wine@---
282l1
283@todo_wine@---
284--- chain failure
285a1
286a2
287b1
288@todo_wine@---
289c1
290c2
291d1
292d2
293d3
294e1
295e2
296@todo_wine@---
297f1
298f2
299f3
300g1
301@todo_wine@g3
302@todo_wine@---
303h1
304@todo_wine@---
305i1
306@todo_wine@i3
307@todo_wine@---
308j1
309j2
310j3
311k1
312k2
313@todo_wine@---
314l1
315l2
316l3
317--- chain brackets
318a1
319a2
320a3
321b1
322b2
323b3
324c1
325c2
326@todo_wine@---
327d1
328d2
329d3
330e1
331e2
332e3
333f1
334f2
335@todo_wine@---
336g1
337@todo_wine@---
338h1
339@todo_wine@---
340i1
341@todo_wine@---
342j1
343j2
344j3
345k1
346k2
347@todo_wine@---
348l1
349l2
350l3
351m1
352@todo_wine@---
353n1
354@todo_wine@---
355o1
356@todo_wine@---
357p1
358p2
359p3
360q1
361q2
362@todo_wine@---
363r1
364r2
365r3
366--- chain pipe
367@todo_wine@a@space@
368@todo_wine@a@space@
369---
370b2
371c1
372c3
373d1
374@todo_wine@---
375e1
376e3
377f2
378f3
379g2
380@todo_wine@---
381h2
382h3
383i3
384--- chain pipe input
385a2:[a1,a2]
386b3:[b2:[b1,b2],b3]@or_broken@b3:[b2:,b3]
387c4:[c3:[c2:[c1,c2],c3],c4]@or_broken@c4:[c3:[c2:,c3],c4]@or_broken@c4:[c3:,c4]
388d2:[d1,d2]
389e3:[e2:[e1,e2],e3]@or_broken@e3:[e2:,e3]
390f4:[f3:[f2:[f1,f2],f3],f4]@or_broken@f4:[f3:[f2:,f3],f4]@or_broken@f4:[f3:,f4]
391--- chain else
392a1
393b2
394@todo_wine@---
395@todo_wine@c3
396@todo_wine@---
397@todo_wine@d3
398@todo_wine@---
399@todo_wine@---
400@todo_wine@---
401@todo_wine@---
402@todo_wine@---
403--- chain else (if true)
404a1 else echo a2
405b2 else echo b3
406c1
407c2 else echo c3
408d1
409@todo_wine@---
410e1
411e2 else echo e3
412f3
413g1 else echo g2
414g3
415h1 else echo h2
416@todo_wine@---
417i1 else echo i2
418i3
419@todo_wine@j2@space@
420@todo_wine@---
421k1
422k2
423l1
424@todo_wine@---
425m1
426m2
427n1
428o1
429p1
430q1
431--- chain else (if false)
432@todo_wine@j3
433---
434k3
435l3
436m3
437n3
438o2
439o3
440p2
441@todo_wine@---
442q2
443q3
444------------ Testing 'set' ------------
4451
4460
447WINE_FOOBAR not defined
448  baz
449WINE_FOOBAR =  baz
4500
451  baz2
4520
453 bar
454WINE_FOOBAR= bar
455WINE_FOOBAR =  baz2
456WINE_FOOBAR =  baz2
457WINE_FOOBAR not defined
4581
459bar
460foobar
461WINE_FOO not defined
462WINE_BAZ=bazbaz
463bazbaz
464set "WINE_FOO=bar" should not include the quotes in the variable value
465bar
466foo
467''
468'foo@space@'
469'foo@tab@'
470'value@space@'
471'value'
472'jim fred'
473'"jim" fred'
474'jim fred'
475'jim'
476'apple"banana"grape'
477------------ Testing variable expansion ------------
478~p0 should be path containing batch file
479@path@
480@path@
481~dp0 should be directory containing batch file
482@drive@@path@
483@drive@@path@
484CD value @pwd@@or_broken@CD value@space@
485%
486P
487P
488S
489P
490PS
491ERRORLEVEL
4920
49300
4940ERRORLEVEL
4950
4960%
497P0
4980S
499P0S
500------------ Testing variable substrings ------------
501q
502qwe
503er
504'ty'@or_broken@''
505't'@or_broken@''
506ert@or_broken@qwerty
507e@or_broken@qwerty
508''@or_broken@'qwerty'
509r@or_broken@qwerty
510------------ Testing variable substitution ------------
511--- in FOR variables
512"A B"
513C
514"A B"
515C
516'A B'@or_broken@''
517'C'@or_broken@''
518@drive@@path@C D@or_broken@%~ff
519@drive@@path@E@or_broken@%~ff
520@drive@
521@drive@
522@path@@or_broken@%~pd
523@path@@or_broken@%~pd
524L M
525N
526'.OOL'
527'.TABC'
528''
529@todo_wine@'@drive@@shortpath@R S'@or_broken@''
530@todo_wine@'@drive@@shortpath@T'@or_broken@''
531@todo_wine@'@drive@@shortpath@ABCDEFGHIJK.LMNOP'@or_broken@''
532''@or_broken@'%~ai'
533''@or_broken@'%~ai'
534'--a------'@or_broken@'--a--------'@or_broken@'--a--c---'@or_broken@'%~ai'
535'5'@or_broken@'%~zi'
536''@or_broken@'%~ti'
537''@or_broken@'%~ti'
538''@or_broken@'%~zi'
539''@or_broken@'%~zi'
540@drive@@path@
541@drive@@path@
542@drive@
543@drive@
544@drive@
545@drive@
546''
547'.eh'
548',,,,,,,,,'
549--- in parameters
550"A B"
551C
552'A B'@or_broken@''
553'C'@or_broken@''
554@drive@@path@C D
555@drive@@path@E
556@drive@
557@drive@
558@path@
559@path@
560L M
561N
562'.OOL'
563'.TABC'
564''
565@todo_wine@'@drive@@shortpath@R S'@or_broken@''
566@todo_wine@'@drive@@shortpath@T'@or_broken@''
567@todo_wine@'@drive@@shortpath@ABCDEFGHIJK.LMNOP'@or_broken@''
568@drive@@path@
569@drive@@path@
570@drive@
571@drive@
572@drive@
573@drive@
574''
575'.eh'@or_broken@''
576------------ Testing variable delayed expansion ------------
577--- default mode (load-time expansion)
578foo
579!WINE_FOO!
580foo
581foo
582--- runtime (delayed) expansion mode
583foo
584foo@or_broken@!WINE_FOO!
585foo
586bar@or_broken@foo
5870
5880@or_broken@1
589foo
590!WINE_FOO!
591--- using /V cmd flag
592foo
593foo@or_broken@!WINE_FOO!
594foo
595!WINE_FOO!
596------------ Testing conditional execution ------------
597--- unconditional ampersand
598foo1
599bar2@space@
600foo2
601foobar deleted
602--- on success conditional and
603@todo_wine@foo3 not created
604bar4@space@
605foo4
606--- on failure conditional or
607foo5
608foo6@space@
609@todo_wine@------------ Testing cd ------------
610singleFile
611Current dir: @drive@@path@foobar@or_broken@Current dir:@space@
612@drive@@path@foobar
613@pwd@
614@drive@@path@foobar
615@pwd@
616@drive@@path@foobar
617@pwd@
618@pwd@
619@pwd@
620@drive@@path@foobar\bar bak
621@drive@@path@foobar\bar bak
622@drive@@path@foobar\bar bak
623@drive@@path@foobar\bar bak
624@drive@@path@foobar\bar bak
625@pwd@
626@drive@@path@foobar
627------------ Testing type ------------
628
629@pwd@>type foobaz@space@
630bar
631
632@pwd@>echo ---@space@
633---
634bar
635---1
636bar
637---2
638bar
639---3
640------------ Testing NUL ------------
641bar
642bar
643bar
644NUL
645foo created
646Passed: file size check on a.a [7]@or_broken@Skipping file size check on NT4
647Passed: file size check on b.b [8]@or_broken@Skipping file size check on NT4
648Passed: file size check on a.a [7]@or_broken@Skipping file size check on NT4
649Passed: file size check on b.b [8]@or_broken@Skipping file size check on NT4
650Passed: file size check on a.a [7]@or_broken@Skipping file size check on NT4
651Passed: file size check on subdir\a.a [8]@or_broken@Skipping file size check on NT4
652------------ Testing if/else ------------
653--- if/else should work with blocks
654if seems to work
655else seems to work
656if seems not to detect /c as parameter
657else if seems to work
658else if seems to work
659else if seems to work
660--- case sensitivity with and without /i option
661if seems to default to case sensitivity
662if /i seems to work
663if /I seems to work
664--- string comparisons
665equal
666non equal
667non equal
668equal
669--- tabs handling
670doom
671doom
672doom
673lol
674quake
675quake
676quake
677--- comparison operators
678------ for strings
679LSS string can be used as operand for LSS comparison
680floats are handled as strings
681numbers in quotes are handled as strings
682negative numbers as well@or_broken@NT4
683if /i seems to work for LSS
684A LSS B
685A LSS AB
686A LSS BA
687A LSS AA
688B LSS BA
689AB LSS B
690AB LSS BA
691AA LSS B
692AA LSS AB
693AA LSS BA
694b LSS B@or_broken@NT4
695a LSS B@or_broken@NT4
696a LSS B insensitive
697A LSS b
698A LSS b insensitive
699A LEQ A
700A LEQ B
701A LEQ AB
702A LEQ BA
703A LEQ AA
704B LEQ B
705B LEQ BA
706AB LEQ B
707AB LEQ AB
708AB LEQ BA
709BA LEQ BA
710AA LEQ B
711AA LEQ AB
712AA LEQ BA
713AA LEQ AA
714b LEQ B@or_broken@NT4
715b LEQ B insensitive
716a LEQ B@or_broken@NT4
717a LEQ B insensitive
718A LEQ b
719A LEQ b insensitive
720A EQU A
721B EQU B
722AB EQU AB
723BA EQU BA
724AA EQU AA
725A EQU a insensitive
726A NEQ B
727A NEQ AB
728A NEQ BA
729A NEQ AA
730B NEQ A
731B NEQ AB
732B NEQ BA
733B NEQ AA
734AB NEQ A
735AB NEQ B
736AB NEQ BA
737AB NEQ AA
738BA NEQ A
739BA NEQ B
740BA NEQ AB
741BA NEQ AA
742AA NEQ A
743AA NEQ B
744AA NEQ AB
745AA NEQ BA
746A GEQ A
747B GEQ A
748B GEQ B
749B GEQ AB
750B GEQ AA
751AB GEQ A
752AB GEQ AB
753AB GEQ AA
754BA GEQ A
755BA GEQ B
756BA GEQ AB
757BA GEQ BA
758BA GEQ AA
759AA GEQ A
760AA GEQ AA
761B GTR A
762B GTR AB
763B GTR AA
764AB GTR A
765AB GTR AA
766BA GTR A
767BA GTR B
768BA GTR AB
769BA GTR AA
770AA GTR A
771------ for numbers
772negative numbers handled
773negative numbers handled
774octal handled
775also in negative form
776hexa handled
777also in negative form
77811 LSS 101
7790 LSS 1
7800 LSS 10
7810 LSS 9
7821 LSS 10
7831 LSS 9
7849 LSS 10
7850 LEQ 0
7860 LEQ 1
7870 LEQ 10
7880 LEQ 9
7891 LEQ 1
7901 LEQ 10
7911 LEQ 9
79210 LEQ 10
7939 LEQ 10
7949 LEQ 9
7950 EQU 0
7961 EQU 1
79710 EQU 10
7989 EQU 9
799octal ok
800hexa ok
801string/hexa compare ok
802string/hexa compare ok
8030 NEQ 1
8040 NEQ 10
8050 NEQ 9
8061 NEQ 0
8071 NEQ 10
8081 NEQ 9
80910 NEQ 0
81010 NEQ 1
81110 NEQ 9
8129 NEQ 0
8139 NEQ 1
8149 NEQ 10
8150 GEQ 0
8161 GEQ 0
8171 GEQ 1
81810 GEQ 0
81910 GEQ 1
82010 GEQ 10
82110 GEQ 9
8229 GEQ 0
8239 GEQ 1
8249 GEQ 9
8251 GTR 0
82610 GTR 0
82710 GTR 1
82810 GTR 9
8299 GTR 0
8309 GTR 1
831------ for numbers and stringified numbers
832strings and integers not equal
833strings and integers not equal
834foo
835"10" GEQ "1"
836'1' GEQ 1@or_broken@NT4
8371 GEQ "1"
838"1" GEQ "1"
839'1' GEQ "1"
840"10" GEQ "1"
841non NT4@or_broken@1 GEQ '1'
842'1' GEQ '1'
843foo
8441 GEQ "10"
845foo
846'1' GEQ "10"
847"10" GEQ "10"
848--- unconditional ampersand after if one line
8491@space@
8502@space@
8513 else echo 4
852---
853x@space@
854---
855x@space@
856---
857x@space@
858---
859x@space@
860---
861------------ Testing for ------------
862--- plain FOR
863A
864B
865C
866%I
867%I
868%I
869%j
870%j
871%j
872A
873B
874C
8751
8764
8771
878A
879B
880C
881X
882X2
883X3
884foo
885M
886X
887M
888N
889O
890`echo
891A
892B`
893'echo
894A
895B'
896"echo A B"
897"A B"
898C
899--- imbricated FORs
900X Y
901X Y
902A C
903A D
904B C
905B D
906A C
907A D
908B C
909B D
910--- basic wildcards
911bazbaz
912--- for /d
913baz@space@
914foo@space@
915bar@space@
916PASSED
917xxx - Should be xxx
918Expected second line
919--- for /R
920Plain directory enumeration
921Plain directory enumeration from provided root
922File enumeration
923File enumeration from provided root
924Mixed enumeration
925Mixed enumeration from provided root
926With duplicates enumeration
927Strip missing wildcards, keep unwildcarded names
928for /R passed
929--- Complex wildcards unix and windows slash
930Windows slashes, valid path
931ASIS: foobar\baz\bazbaz
932WC  : foobar\baz\bazbaz
933Windows slashes, invalid path
934ASIS: foobar\jim\bazbaz
935Unix slashes, valid path
936ASIS: foobar/baz/bazbaz
937WC  : bazbaz
938Unix slashes, invalid path
939ASIS: foobar/jim/bazbaz
940Done
941--- for /L
9421
9433
9445
9451
9463
9475
9480
9492
9501
951-1
952ErrorLevel 0
953ErrorLevel 0
9541
9552
9563
9574
9581
9593
9604
9613
9622
9631
9644
9652
9660
9671
9681
969-1
970-1
9711
9723
973--- set /a
974------ individual operations
975WINE_foo correctly 3
976WINE_foo correctly -1
977WINE_foo correctly 3
978WINE_foo correctly 6
979WINE_foo correctly 10
980WINE_foo correctly 4
981WINE_foo correctly 4
982WINE_foo correctly -4
983WINE_foo correctly 0
984WINE_foo correctly 2
985WINE_foo correctly 2
986WINE_foo correctly -2
987WINE_foo correctly 1
988WINE_foo correctly 4
989WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly 1073741824 [0]
990WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly -1073741824 [0]
991WINE_foo correctly -4
992WINE_foo correctly 9
993WINE_foo correctly 2
994WINE_foo correctly 0
995WINE_foo correctly -1
996WINE_foo correctly -3
997WINE_foo correctly 0
998WINE_foo correctly 1
999WINE_foo correctly 1
1000WINE_foo correctly 4
1001WINE_foo correctly 1
1002WINE_foo correctly 5
1003WINE_foo correctly 5
1004WINE_foo correctly 7
1005WINE_foo correctly 5
1006WINE_foo correctly 5
1007WINE_foo correctly 5
1008WINE_foo correctly 4
1009WINE_foo correctly 6
1010WINE_foo correctly 1
1011WINE_foo correctly 4
1012------ precedence and grouping
1013WINE_foo correctly 10
1014WINE_foo correctly 18@or_broken@ERROR: WINE_foo incorrectly  [18]
1015WINE_foo correctly 2@or_broken@ERROR: WINE_foo incorrectly 0 [2]
1016WINE_foo correctly 2@or_broken@ERROR: WINE_foo incorrectly  [2]
1017WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly 4 [0]
1018WINE_foo correctly 4@or_broken@ERROR: WINE_foo incorrectly  [4]
1019WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly  [3]
1020WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly  [3]
1021------ octal and hexadecimal
1022WINE_foo correctly 18
1023WINE_foo correctly 18
1024WINE_foo correctly 15
1025WINE_foo correctly 3
1026------ variables
1027WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly 0 [3]
1028WINE_bar correctly 3@or_broken@ERROR: WINE_bar incorrectly  [3]
1029WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly 0 [3]
1030WINE_bar correctly 4@or_broken@ERROR: WINE_bar incorrectly  [4]
1031WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly 0 [3]
1032WINE_bar correctly 3@or_broken@ERROR: WINE_bar incorrectly  [3]
1033WINE_baz correctly 4@or_broken@ERROR: WINE_baz incorrectly  [4]
1034WINE_foo correctly 9@or_broken@ERROR: WINE_foo incorrectly 3 [9]
1035WINE_bar correctly 9@or_broken@ERROR: WINE_bar incorrectly 3 [9]
1036WINE_foo correctly 0
1037WINE_foo correctly 4
1038WINE_bar correctly 4
1039WINE_foo correctly -7@or_broken@ERROR: WINE_foo incorrectly 4 [-7]
1040WINE_bar correctly -7@or_broken@ERROR: WINE_bar incorrectly 4 [-7]
1041WINE_foo correctly -1@or_broken@ERROR: WINE_foo incorrectly -7 [-1]
1042WINE_bar correctly -1@or_broken@ERROR: WINE_bar incorrectly -7 [-1]
1043WINE_foo correctly 5@or_broken@ERROR: WINE_foo incorrectly 0 [5]
1044WINE_bar correctly 1@or_broken@ERROR: WINE_bar incorrectly  [1]
1045WINE_foo correctly 4@or_broken@ERROR: WINE_foo incorrectly 1 [4]
1046WINE_bar correctly 4@or_broken@ERROR: WINE_bar incorrectly 1 [4]
1047WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly 4 [1]
1048WINE_bar correctly 1@or_broken@ERROR: WINE_bar incorrectly 4 [1]
1049WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly 1 [0]
1050WINE_bar correctly 0@or_broken@ERROR: WINE_bar incorrectly 1 [0]
1051WINE_foo correctly 5@or_broken@ERROR: WINE_foo incorrectly 0 [5]
1052WINE_bar correctly 7@or_broken@ERROR: WINE_bar incorrectly  [7]
1053WINE_foo correctly 5@or_broken@ERROR: WINE_foo incorrectly 0 [5]
1054WINE_bar correctly 7@or_broken@ERROR: WINE_bar incorrectly  [7]
1055WINE_foo correctly 19@or_broken@ERROR: WINE_foo incorrectly 0 [19]
1056WINE_bar correctly 3@or_broken@ERROR: WINE_bar incorrectly  [3]
1057WINE_baz correctly 4
1058--- quotes
1059WINE_foo correctly 1
1060WINE_foo correctly 1
1061WINE_foo correctly 1
1062WINE_bar correctly 2
1063WINE_foo correctly 1
1064WINE_bar correctly 2
1065WINE_foo correctly 1
1066WINE_bar correctly 2
1067WINE_foo correctly 1
1068WINE_bar correctly 2
1069WINE_foo correctly 1
1070WINE_bar correctly 2
1071WINE_baz correctly 3
1072WINE_foo correctly 1
1073WINE_bar correctly 2
1074WINE_baz correctly 3
1075WINE_foo correctly 1
1076WINE_bar correctly 2
1077WINE_baz correctly 3
1078WINE_foo correctly 1
1079WINE_bar correctly 2
1080WINE_baz correctly 3
1081WINE_foo correctly 1
1082WINE_bar correctly 2
1083WINE_baz correctly 3
1084WINE_foo correctly 1
1085WINE_foo correctly 1
1086WINE_bar correctly 5
1087WINE_baz correctly 2
1088WINE_foo correctly 18
1089WINE_foo correctly 3
1090WINE_bar correctly 7@or_broken@ERROR: WINE_bar incorrectly 4 [7]
1091--- whitespace are ignored between double char operators
1092WINE_foo correctly 10@or_broken@ERROR: WINE_foo incorrectly 4 [10]
1093WINE_bar correctly 50@or_broken@ERROR: WINE_bar incorrectly 5 [50]
1094WINE_foo correctly 772@or_broken@ERROR: WINE_foo incorrectly 4 [772]
1095WINE_bar correctly 7720@or_broken@ERROR: WINE_bar incorrectly 5 [7720]
1096--- invalid operator sequence
10974
10984
1099----- negative prefix
1100WINE_foo correctly -1
1101WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly  [1]
1102WINE_foo correctly 6
1103WINE_foo correctly 0
1104WINE_foo correctly 6
1105WINE_foo correctly 2
1106WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly  [0]
1107WINE_foo correctly 5
1108WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly -5 [3]
1109----- assignment tests involving the end destination
1110WINE_foo correctly 11@or_broken@ERROR: WINE_foo incorrectly 3 [11]
1111WINE_foo correctly 6@or_broken@ERROR: WINE_foo incorrectly 2 [6]
1112WINE_bar correctly 9@or_broken@ERROR: WINE_bar incorrectly  [9]
1113WINE_foo correctly 6@or_broken@ERROR: WINE_foo incorrectly 2 [6]
1114WINE_bar correctly 10@or_broken@ERROR: WINE_bar incorrectly  [10]
1115WINE_baz correctly 7@or_broken@ERROR: WINE_baz incorrectly  [7]
1116WINE_foo correctly 7@or_broken@ERROR: WINE_foo incorrectly 2 [7]
1117WINE_bar correctly 7@or_broken@ERROR: WINE_bar incorrectly 2 [7]
1118----- equal precedence on stack
1119WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly 0 [1]
1120WINE_foo correctly 0
1121WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly  [1]
1122WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly  [0]
1123WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly  [1]
1124WINE_foo correctly -1@or_broken@ERROR: WINE_foo incorrectly  [-1]
1125WINE_foo correctly -1@or_broken@ERROR: WINE_foo incorrectly  [-1]
1126WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly  [1]
1127WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly  [0]
1128WINE_foo correctly -1
1129WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly -1 [0]
1130WINE_foo correctly 0
1131WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly 0 [1]
1132WINE_foo correctly -1@or_broken@ERROR: WINE_foo incorrectly 0 [-1]
1133WINE_foo correctly 25@or_broken@ERROR: WINE_foo incorrectly 20 [25]
1134WINE_foo correctly 20
1135WINE_foo correctly 1
1136WINE_foo correctly 4
1137WINE_foo correctly 7
1138WINE_foo correctly 8@or_broken@ERROR: WINE_foo incorrectly 4 [8]
1139WINE_foo correctly 6@or_broken@ERROR: WINE_foo incorrectly 5 [6]
1140WINE_bar correctly 6@or_broken@ERROR: WINE_bar incorrectly 5 [6]
1141--- for /F
1142------ string argument
1143a
1144a@or_broken@no output
1145a
1146a@or_broken@no output
1147a
1148a@or_broken@no output
1149a
1150a@or_broken@no output
1151a
1152a@or_broken@no output
1153------ fileset argument
1154--------- basic blank handling
1155a
1156a
1157a
1158a
1159a
1160b
1161--------- multi-line with empty lines
1162a
1163b
1164c
1165--------- multiple files
1166a
1167b
1168c
1169q
1170kkk
1171q
1172kkk
1173a
1174b
1175c
1176------ command argument
1177Passed1@or_broken@Missing functionality - Broken1
1178Passed2@or_broken@Missing functionality - Broken2
1179Passed3@or_broken@Missing functionality - Broken3
1180------ eol option
1181and@or_broken@Broken NT4 functionality1
1182Line@or_broken@Broken NT4 functionality2
1183Line@or_broken@Broken NT4 functionality3
1184ad
1185z@y
1186a|d
1187no output
1188no output
1189------ delims option
1190a
1191a@space@
1192a d
1193a
1194C r
1195foo bar baz
1196c:\
1197------ skip option
1198c
1199no output
1200no output
1201c
1202c
1203no output
1204------ tokens= option
1205h=%h i=a j=%j k=%k l=%l m=%m o=%o
1206h=%h i=b j=%j k=%k l=%l m=%m o=%o
1207h=%h i=a j=c k=e l=f m=g o=%o
1208h=%h i=a j=e k=f g l=%l m=%m o=%o
1209h=%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
1210h=%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
1211h=%h i=a j=b k=c l=d e f g m=%m n=%n o=%o
1212h=%h i=a j=b k=c l=d e f g m=%m n=%n o=%o
1213h=%h i=a j=b k= l= m=%m n=%n o=%o
1214h=%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
1215h=%h i=a j=b k= l= m= n=%n o=%o
1216h=%h i=a j=b k= l= m= n= o=%o
1217u=a v=b w=c x=d y=e z=f A=%A a=%a
1218@todo_wine@U=a V=b W=c X=d Y=e Z=f A=%A a=m
1219h=%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
1220h=%h i=e j=%j k=%k l=%l m=%m o=%o
1221h=%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
1222h=%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
1223h=%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
1224h=%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
1225------------ Testing del ------------
1226deleting 'file'
1227errorlevel is 0, good
1228successfully deleted 'file'
1229attempting to delete 'file', even though it is not present
1230errorlevel is 0, good
1231------------ Testing del /a ------------
1232not-r.test not found after delete, good
1233r.test found before delete, good
1234r.test not found after delete, good
1235------------ Testing del /q ------------
1236del /q * succeeded on file1
1237del /q * succeeded on file2.dat
1238------------ Testing del /s ------------
1239------------ Testing rename ------------
1240--- ren and rename are synonymous
1241foo renamed to bar
1242bar renamed to foo
1243--- name collision
1244foo
1245bar
1246--- rename read-only files
1247read-only file renamed
1248--- rename directories
1249dir renamed
1250read-only dir renamed
1251--- rename in other directory
1252rename impossible in other directory
1253original file still present
1254------------ Testing move ------------
1255--- file move
1256file move succeeded
1257@todo_wine@file move with overwrite succeeded@or_broken@file overwrite impossible!
1258@todo_wine@bar@or_broken@baz
1259read-only files are moveable
1260file moved in subdirectory
1261@todo_wine@moving a file to itself is a no-op@or_broken@moving a file to itself should be a no-op!
1262@todo_wine@ErrorLevel: 0@or_broken@ErrorLevel: 1
1263--- directory move
1264simple directory move succeeded
1265moving a directory to itself gives error; errlevel 1
1266------ dir in dir move
1267foo
1268bar2
1269foo2
1270------------ Testing mkdir ------------
1271--- md and mkdir are synonymous
12720
12730
1274--- creating an already existing directory/file must fail
12751
12761
1277--- multilevel path creation
12780
12790
12800
12810
12820
12831
12840
12850
1286--- trailing backslashes
12870
1288dir created
12890
1290--- invalid chars
1291mkdir ? gives errorlevel 1
1292mkdir ?\foo gives errorlevel 1
1293mkdir foo\? gives errorlevel 1
1294ok, foo created
1295mkdir foo\bar\? gives errorlevel 1
1296ok, foo\bar created
1297--- multiple directories at once
1298foo created
1299bar created
1300foobar created
1301bar\baz created
1302bazbaz created
1303zabzab created
1304mkdir foo\* errorlevel 1
1305ok, foo created
1306------------ Testing rmdir ------------
13070
1308dir removed
13090
1310dir removed
13110
13120
1313file not removed
13140
1315non-empty dir not removed
13160
1317non-empty dir not removed
1318recursive rmdir succeeded
1319recursive rmdir succeeded
1320foo removed
1321bar removed
1322foobar removed
1323bar\baz removed
1324------------ Testing pushd/popd ------------
1325@pwd@
1326--- popd is no-op when dir stack is empty
1327@pwd@
1328--- pushing non-existing dir
1329@pwd@
1330--- basic behaviour
1331@drive@@path@foobar
1332@pwd@
1333@drive@@path@foobar\baz
1334@drive@@path@foobar
1335@drive@@path@foobar
1336@pwd@
1337@drive@@path@foobar
1338@pwd@
1339------------ Testing attrib ------------
1340A            @drive@@path@foobar\foo@or_broken@A          @drive@@path@foobar\foo@or_broken@A       I    @drive@@path@foobar\foo
1341--- read-only attribute
1342A    R       @drive@@path@foobar\foo@or_broken@A    R     @drive@@path@foobar\foo@or_broken@A    R  I    @drive@@path@foobar\foo
1343foo
1344foo original contents
1345Read-only file not deleted
1346Read-only file forcibly deleted
1347--- recursive behaviour
1348A            @drive@@path@foobar\baz\level2@or_broken@A          @drive@@path@foobar\baz\level2@or_broken@A       I    @drive@@path@foobar\baz\level2
1349A    R       @drive@@path@foobar\level1@or_broken@A    R     @drive@@path@foobar\level1@or_broken@A    R  I    @drive@@path@foobar\level1
1350A    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
1351A            @drive@@path@foobar\bar@or_broken@A          @drive@@path@foobar\bar@or_broken@A       I    @drive@@path@foobar\bar
1352--- folders processing
1353             @drive@@path@foobar@or_broken@           @drive@@path@foobar@or_broken@        I    @drive@@path@foobar
1354@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
1355A            @drive@@path@foobar\baz\toto@or_broken@A          @drive@@path@foobar\baz\toto@or_broken@A       I    @drive@@path@foobar\baz\toto
1356toto
1357lulu
1358file created in read-only dir
1359------------ Testing assoc ------------
1360--- setting association
1361---
1362.foo=bar
1363.foo=bar
1364+++
1365.foo=bar
1366--- resetting association
1367---
1368+++
1369---
1370------------ Testing ftype ------------
1371--- setting association
1372---
1373footype=foo_opencmd
1374.foo=footype
1375footype=foo_opencmd
1376+++
1377footype=foo_opencmd
1378--- resetting association
1379@todo_wine@original value@or_broken@buggyXP@or_broken@!WINE_FOO!
1380------------ Testing CALL ------------
1381--- external script
1382foo@space@
1383foo 8
1384foo@space@@space@
1385foo bar@space@
1386foo ""@space@
1387"" bar@space@
1388foo ''@space@
1389'' bar@space@
1390--- internal routines
1391bar :testRoutine
1392foo@space@
1393foo bar
1394foo ""
1395"" bar
1396foo ''
1397'' bar
1398--- with builtins
13990
1400foo created
1401Should expand foobaz
1402batfile
1403robinfile
14041
14051
1406non-builtin dir
1407Line one
1408Line two
1409Get if
1410... and else!
1411passed
1412------------ Testing SHIFT ------------
1413'p1' 'p2' 'p3' 'p4' 'p5'
1414'p2' 'p3' 'p4' 'p5' ''
1415'p3' 'p4' 'p5' '' ''
1416'p3' 'p5' '' '' ''
1417'p3' 'p5' '' '' ''
1418'p5' '' '' '' ''
1419------------ Testing cmd invocation ------------
1420--- a batch file can delete itself
1421file correctly deleted
1422--- a batch file can alter itself
1423bar
1424---------- Testing copy
1425Passed: Found expected dummy.file
1426Passed: Found expected dir1\file1
1427Passed: Found expected dir1\file1
1428Passed: Found expected dir1\file99
1429Passed: Found expected file1
1430Passed: Did not find dir2
1431Passed: Did not find dir2\file1
1432Passed: Found expected dir1\file1
1433Passed: Found expected dir1\file2
1434Passed: Found expected dir1\file3
1435Passed: Found expected dir1\file1
1436Passed: Found expected dir1\file2
1437Passed: Found expected dir1\file3
1438Passed: Found expected file1
1439Passed: Found expected file2
1440Passed: Found expected file3
1441Passed: Did not find dir2
1442Passed: Did not find dir2\file1
1443Passed: Did not find dir2\file2
1444Passed: Did not find dir2\file3
1445Passed: Found expected testfile
1446Passed: Found expected testfile
1447Passed: Found expected testfile
1448Passed: Found expected testfile
1449Passed: Found expected testfile
1450Passed: Found expected dir1\fred
1451Passed: Found expected dir1\fred
1452Passed: Found expected fred
1453Passed: Found expected fred
1454Passed: file size check on file1 [5]@or_broken@Skipping file size check on NT4
1455Passed: file size check on file2 [8]@or_broken@Skipping file size check on NT4
1456Passed: file size check on file3 [11]@or_broken@Skipping file size check on NT4
1457Passed: file size check on file1_default [5]@or_broken@Skipping file size check on NT4
1458Passed: file size check on file1_default2 [5]@or_broken@Skipping file size check on NT4
1459Passed: file size check on file1_plus_eof [6]@or_broken@Skipping file size check on NT4
1460Passed: file size check on file2_plus_eof [9]@or_broken@Skipping file size check on NT4
1461Passed: file size check on file3_plus_eof [12]@or_broken@Skipping file size check on NT4
1462Passed: file size check on file12_plus_eof [14]@or_broken@Skipping file size check on NT4
1463Passed: file size check on file12_no_eof [13]@or_broken@Skipping file size check on NT4
1464Passed: file size check on file12_eof2 [14]@or_broken@Skipping file size check on NT4
1465Passed: file size check on file1 [24]@or_broken@Skipping file size check on NT4
1466Passed: file size check on file2 [16]@or_broken@Skipping file size check on NT4
1467Passed: file size check on file3 [13]@or_broken@Skipping file size check on NT4
1468Passed: file size check on file1_binary_srccopy [6]@or_broken@Skipping file size check on NT4
1469Passed: file size check on file1_ascii_srccopy [5]@or_broken@Skipping file size check on NT4
1470Passed: file size check on file123_default_copy [25]@or_broken@Skipping file size check on NT4
1471Passed: file size check on file123_ascii_copy [25]@or_broken@Skipping file size check on NT4
1472Passed: file size check on file123_binary_copy [27]@or_broken@Skipping file size check on NT4
1473Passed: file size check on file123_mixed_copy1 [26]@or_broken@Skipping file size check on NT4
1474Passed: file size check on file123_mixed_copy2 [27]@or_broken@Skipping file size check on NT4
1475Passed: file size check on file123_mixed_copy3 [26]@or_broken@Skipping file size check on NT4
1476Passed: file size check on file123_mixed_copy4 [25]@or_broken@Skipping file size check on NT4
1477Passed: file size check on file123_mixed_copy5 [28]@or_broken@Skipping file size check on NT4
1478Passed: file size check on file123_mixed_copy6 [19]@or_broken@Skipping file size check on NT4
1479Passed: file size check on file123_mixed_copy7 [6]@or_broken@Skipping file size check on NT4
1480Passed: file size check on file123_mixed_copy8 [7]@or_broken@Skipping file size check on NT4
1481Passed: errorlevel invalid check 1
1482Passed: Did not find dir1\file1
1483Passed: errorlevel invalid check 2
1484Passed: errorlevel invalid check 3
1485------------ Testing setlocal/endlocal ------------
1486--- enable/disable extensions
1487@todo_wine@ErrLev:@space@
1488ErrLev: 0
1489ErrLev: 0
1490@todo_wine@ErrLev:@space@@or_broken@ErrLev: 0
1491ErrLev: 0
1492--- setlocal with corresponding endlocal
1493globalval
1494localval
1495@drive@@path@foobar\foobar2
1496globalval
1497@drive@@path@foobar
1498globalval
1499@drive@@path@foobar
1500--- setlocal with no corresponding endlocal
1501globalval
1502localval
1503@drive@@path@foobar\foobar2
1504globalval
1505@drive@@path@foobar
1506--- setlocal within same batch program
1507Var1 ok 1
1508Var2 ok 2
1509Var3 ok 3
1510Directory is ok 1
1511Var1 ok 1
1512Var2 ok 2
1513Var3 ok 3
1514Directory is ok 2
1515Var1 ok 1
1516Var2 ok 2
1517Var3 ok 3
1518Directory is ok 3
1519--- Mismatched set and end locals
1520--- Extra setlocal in called batch
1521value2
15222set1endvalue1
1523@drive@@path@foobar\foodir3
1524Finished:
1525value2
1526@drive@@path@foobar\foodir2
1527value1
1528@drive@@path@foobar
1529--- Extra endlocal in called batch
1530value2
1531value2
1532@drive@@path@foobar\foodir2
1533value2
1534@drive@@path@foobar\foodir2
1535Finished:
1536value2
1537@drive@@path@foobar\foodir2
1538value1
1539@drive@@path@foobar
1540--- endlocal in called function rather than batch pgm is ineffective
15412
15422
15431
15442
15451
15462
15471
15481
1549------------ Testing Errorlevel ------------
15509009
15511
1552errorlevel just right, good
1553errorlevel with leading zero just right, good
1554errorlevel with negative number OK
1555abc0def@or_broken@abc1def
1556errorlevel zero, good@or_broken@errorlevel nonzero, bad
15577 should be 7
15587 should still be 7
1559------------ Testing GOTO ------------
1560goto with no leading space worked
1561goto with colon and no leading space worked
1562goto with a leading space worked
1563goto with a leading tab worked
1564goto with a following space worked
1565goto with following amphersands worked
1566goto with redirections worked
1567Ignoring double colons worked
1568label with mixed whitespace and no echo worked
1569Correctly ignored trailing information
1570------------ Testing PATH ------------
1571PATH=original
1572PATH=try2
1573PATH=try3
1574------------ Testing combined CALLs/GOTOs ------------
1575world
1576cheball
1577barbare
1578bar
1579foo
1580baz
1581cheball
1582barbare
1583