Skip to content
Snippets Groups Projects
test_builtins.cmd.exp 28.6 KiB
Newer Older
@pwd@>echo Tests for cmd's builtin commands@space@
Tests for cmd's builtin commands
@pwd@>echo ------------ Testing 'echo' [ON] ------------@space@
------------ Testing 'echo' [ON] ------------

@pwd@>echo word@space@
word

@pwd@>echo 'singlequotedword'@space@
'singlequotedword'

@pwd@>echo "doublequotedword"@space@
"doublequotedword"
at-echoed-word

@pwd@>echo "/?"@space@
"/?"

Thomas Faller's avatar
Thomas Faller committed
@pwd@>echo/


@pwd@>echo /@space@
/

@pwd@>echo/word
word

@pwd@>echo /word@space@
/word

@pwd@>echo word@space@@space@
word@space@

@pwd@>echo word@space@@space@@space@
word@space@@space@
@pwd@>echo word@space@
word

@pwd@>echo@tab@word@space@

@pwd@>echo@tab@word@space@@tab@@space@
word@space@@tab@

@pwd@>echo@tab@word@tab@@space@@space@
word@tab@@space@
@pwd@>echo word@space@
word

@pwd@>echo@space@@tab@word@space@
@tab@word

@pwd@>echo@space@@space@@tab@word@space@
@space@@tab@word

@pwd@>echo@tab@@tab@word@space@
@tab@word

@pwd@>echo @tab@ on @space@@space@
--- @ with chains and brackets

@todo_wine@@pwd@>(echo the @ character chains until  && )  && echo and can hide brackets  || ()  ||@space@
@todo_wine@the @ character chains until
@todo_wine@we leave the current depth
@todo_wine@and can hide brackets
@todo_wine@---
------------ Testing 'echo' [OFF] ------------
Jacek Caban's avatar
Jacek Caban committed
word
'singlequotedword'
"doublequotedword"
at-echoed-word
"/?"

.
word
word@space@@tab@
word@tab@@space@
word
@tab@word
@space@@tab@word
@tab@word
------------ Testing mixed echo modes ------------
@echo on
if 1==1 echo foo
if 1==1 @echo bar
@echo off
if 1==1 echo foo2
if 1==1 @echo bar2

@todo_wine@@pwd@>if 1 == 1 echo foo@space@
foo

@todo_wine@@pwd@>if 1 == 1@space@
bar
foo2
bar2
------------ Testing parameterization ------------
'a', 'b', 'c'
'"a b c"', '', ''
'"a b"\c', '', ''
'a', '~`+', '.{}!+b'
'a', 'b', ''
'"a;b"', '', ''
'a[b]{c}(d)e', '', ''
'a', '', ''
second line
'a', 'b', 'c'
'a', 'b', 'c'
'a', 'b', ''
------------ Testing rem ------------

@pwd@>rem Hello@space@

@pwd@>rem  Hello@space@

@pwd@>rem   Hello || foo@space@

@pwd@>rem echo lol@space@

@pwd@>rem echo foo & echo bar@space@

@pwd@>rem @tab@  Hello@space@

@pwd@>rem@tab@  Hello@space@

@pwd@>rem@tab@echo foo & echo bar@space@
------------ Testing redirection operators ------------
foo@tab@
foo@space@
foo@tab@
foo7@space@@or_broken@foo@tab@
foo9@space@@or_broken@foo@tab@
foo1
foo11
foo12
foo
foo@space@
foob@space@
foob@space@
fooc@space@
foob@space@
fooc@space@
fooc@space@
food1
food2
food21
@todo_wine@foo7@space@@space@@or_broken@not supported@space@
@todo_wine@foo@or_broken@not supported
file does not exist, ok
------------ Testing circumflex escape character ------------
hello, world
hello, world
hell^o, world
hell^o, world
foo | echo bar
foo & echo bar
bak &
------------ Testing 'set' ------------
WINE_FOOBAR not defined
WINE_FOOBAR= bar
WINE_FOOBAR =  baz2
WINE_FOOBAR =  baz2
WINE_FOOBAR not defined
WINE_FOO not defined
WINE_BAZ=bazbaz
set "WINE_FOO=bar" should not include the quotes in the variable value
'foo@space@'
'foo@tab@'
'value@space@'
'value'
'jim fred'
'"jim" fred'
'jim fred'
'jim'
'apple"banana"grape'
------------ Testing variable expansion ------------
~p0 should be path containing batch file
@path@
@path@
~dp0 should be directory containing batch file
0ERRORLEVEL
------------ Testing variable substrings ------------
't'@or_broken@''
ert@or_broken@qwerty
e@or_broken@qwerty
''@or_broken@'qwerty'
r@or_broken@qwerty
------------ Testing variable substitution ------------
'A B'@or_broken@''
'C'@or_broken@''
@drive@@path@C D@or_broken@%~ff
@drive@@path@E@or_broken@%~ff
@drive@
@drive@
@path@@or_broken@%~pd
@path@@or_broken@%~pd
L M
N
'.OOL'
'.TABC'
''
@todo_wine@'@drive@@shortpath@R S'@or_broken@''
@todo_wine@'@drive@@shortpath@T'@or_broken@''
@todo_wine@'@drive@@shortpath@ABCDEFGHIJK.LMNOP'@or_broken@''
''@or_broken@'%~ai'
''@or_broken@'%~ai'
'--a------'@or_broken@'--a--------'@or_broken@'%~ai'
'5'@or_broken@'%~zi'
''@or_broken@'%~ti'
''@or_broken@'%~ti'
''@or_broken@'%~zi'
''@or_broken@'%~zi'
@drive@@path@
@drive@@path@
@drive@
@drive@
@drive@
@drive@
''
'.eh'
'A B'@or_broken@''
'.TABC'
''
@todo_wine@'@drive@@shortpath@R S'@or_broken@''
@todo_wine@'@drive@@shortpath@T'@or_broken@''
@todo_wine@'@drive@@shortpath@ABCDEFGHIJK.LMNOP'@or_broken@''
@drive@@path@
@drive@@path@
@drive@
@drive@
@drive@
@drive@
''
'.eh'@or_broken@''
------------ Testing variable delayed expansion ------------
foo@or_broken@!WINE_FOO!
foo@or_broken@!WINE_FOO!
------------ Testing conditional execution ------------
@todo_wine@foo3 not created
bar4@space@
foo4
--- on failure conditional or
foo5
foo6@space@
@todo_wine@------------ Testing cd ------------
singleFile
Current dir: @drive@@path@foobar@or_broken@Current dir:@space@
@drive@@path@foobar
@drive@@path@foobar\bar bak
@drive@@path@foobar\bar bak
@drive@@path@foobar\bar bak
@drive@@path@foobar\bar bak
@drive@@path@foobar\bar bak
------------ Testing type ------------

@pwd@>type foobaz@space@
bar

------------ Testing NUL ------------
bar
bar
bar
NUL
foo created
Passed: file size check on a.a [7]@or_broken@Skipping file size check on NT4
Passed: file size check on b.b [8]@or_broken@Skipping file size check on NT4
Passed: file size check on a.a [7]@or_broken@Skipping file size check on NT4
Passed: file size check on b.b [8]@or_broken@Skipping file size check on NT4
Passed: file size check on a.a [7]@or_broken@Skipping file size check on NT4
Passed: file size check on subdir\a.a [8]@or_broken@Skipping file size check on NT4
------------ Testing if/else ------------
--- if/else should work with blocks
Dan Kegel's avatar
Dan Kegel committed
if seems to work
else seems to work
if seems not to detect /c as parameter
else if seems to work
else if seems to work
else if seems to work
--- case sensitivity with and without /i option
if seems to default to case sensitivity
if /i seems to work
if /I seems to work
doom
doom
doom
lol
quake
quake
quake
--- comparison operators
------ for strings
LSS string can be used as operand for LSS comparison
floats are handled as strings
numbers in quotes are handled as strings
negative numbers as well@or_broken@NT4
if /i seems to work for LSS
A LSS B
A LSS AB
A LSS BA
AA LSS BA
b LSS B@or_broken@NT4
a LSS B@or_broken@NT4
a LSS B insensitive
A LSS b
A LSS b insensitive
AA LEQ BA
AA LEQ AA
b LEQ B@or_broken@NT4
b LEQ B insensitive
a LEQ B@or_broken@NT4
a LEQ B insensitive
A LEQ b
A LEQ b insensitive
A EQU A
B EQU B
AB EQU AB
BA EQU BA
AA EQU AA
A EQU a insensitive
AB NEQ A
AB NEQ B
AB NEQ BA
BA NEQ A
BA NEQ B
BA NEQ AB
AA NEQ A
AA NEQ B
AA NEQ AB
AA NEQ BA
AB GEQ AA
BA GEQ A
BA GEQ B
------ for numbers
negative numbers handled
negative numbers handled
octal handled
also in negative form
hexa handled
also in negative form
11 LSS 101
0 EQU 0
1 EQU 1
10 EQU 10
9 EQU 9
octal ok
hexa ok
string/hexa compare ok
string/hexa compare ok
------ for numbers and stringified numbers
strings and integers not equal
strings and integers not equal
foo
"10" GEQ "1"
'1' GEQ 1@or_broken@NT4
1 GEQ "1"
"1" GEQ "1"
'1' GEQ "1"
"10" GEQ "1"
non NT4@or_broken@1 GEQ '1'
'1' GEQ '1'
foo
1 GEQ "10"
foo
'1' GEQ "10"
"10" GEQ "10"
--- unconditional ampersand after if one line
1@space@
2@space@
3 else echo 4
---
x@space@
---
x@space@
---
x@space@
---
x@space@
---
------------ Testing for ------------
baz@space@
foo@space@
bar@space@
PASSED
xxx - Should be xxx
Expected second line
--- for /R
Plain directory enumeration
Plain directory enumeration from provided root
File enumeration
File enumeration from provided root
Mixed enumeration
Mixed enumeration from provided root
With duplicates enumeration
Strip missing wildcards, keep unwildcarded names
for /R passed
--- Complex wildcards unix and windows slash
Windows slashes, valid path
ASIS: foobar\baz\bazbaz
WC  : foobar\baz\bazbaz
Windows slashes, invalid path
Unix slashes, valid path
ASIS: foobar/baz/bazbaz
WC  : bazbaz
Unix slashes, invalid path
Jason Edmeades's avatar
Jason Edmeades committed
WINE_foo correctly 3
WINE_foo correctly -1
WINE_foo correctly 3
WINE_foo correctly 6
WINE_foo correctly 10
WINE_foo correctly 4
WINE_foo correctly 4
WINE_foo correctly -4
WINE_foo correctly 0
WINE_foo correctly 2
WINE_foo correctly 2
WINE_foo correctly -2
WINE_foo correctly 1
WINE_foo correctly 4
WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly 1073741824 [0]
WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly -1073741824 [0]
WINE_foo correctly -4
WINE_foo correctly 9
WINE_foo correctly 2
WINE_foo correctly 0
WINE_foo correctly -1
WINE_foo correctly -3
WINE_foo correctly 0
WINE_foo correctly 1
WINE_foo correctly 1
WINE_foo correctly 4
WINE_foo correctly 1
WINE_foo correctly 5
WINE_foo correctly 5
WINE_foo correctly 7
WINE_foo correctly 5
WINE_foo correctly 5
WINE_foo correctly 5
WINE_foo correctly 4
WINE_foo correctly 6
WINE_foo correctly 1
WINE_foo correctly 4
Jason Edmeades's avatar
Jason Edmeades committed
WINE_foo correctly 10
WINE_foo correctly 18@or_broken@ERROR: WINE_foo incorrectly  [18]
WINE_foo correctly 2@or_broken@ERROR: WINE_foo incorrectly 0 [2]
WINE_foo correctly 2@or_broken@ERROR: WINE_foo incorrectly  [2]
WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly 4 [0]
WINE_foo correctly 4@or_broken@ERROR: WINE_foo incorrectly  [4]
WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly  [3]
WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly  [3]
Jason Edmeades's avatar
Jason Edmeades committed
WINE_foo correctly 18
WINE_foo correctly 18
WINE_foo correctly 15
WINE_foo correctly 3
Jason Edmeades's avatar
Jason Edmeades committed
WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly 0 [3]
WINE_bar correctly 3@or_broken@ERROR: WINE_bar incorrectly  [3]
WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly 0 [3]
WINE_bar correctly 4@or_broken@ERROR: WINE_bar incorrectly  [4]
WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly 0 [3]
WINE_bar correctly 3@or_broken@ERROR: WINE_bar incorrectly  [3]
WINE_baz correctly 4@or_broken@ERROR: WINE_baz incorrectly  [4]
WINE_foo correctly 9@or_broken@ERROR: WINE_foo incorrectly 3 [9]
WINE_bar correctly 9@or_broken@ERROR: WINE_bar incorrectly 3 [9]
WINE_foo correctly 0
WINE_foo correctly 4
WINE_bar correctly 4
Jason Edmeades's avatar
Jason Edmeades committed
WINE_foo correctly -7@or_broken@ERROR: WINE_foo incorrectly 4 [-7]
WINE_bar correctly -7@or_broken@ERROR: WINE_bar incorrectly 4 [-7]
WINE_foo correctly -1@or_broken@ERROR: WINE_foo incorrectly -7 [-1]
WINE_bar correctly -1@or_broken@ERROR: WINE_bar incorrectly -7 [-1]
WINE_foo correctly 5@or_broken@ERROR: WINE_foo incorrectly 0 [5]
WINE_bar correctly 1@or_broken@ERROR: WINE_bar incorrectly  [1]
WINE_foo correctly 4@or_broken@ERROR: WINE_foo incorrectly 1 [4]
WINE_bar correctly 4@or_broken@ERROR: WINE_bar incorrectly 1 [4]
WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly 4 [1]
WINE_bar correctly 1@or_broken@ERROR: WINE_bar incorrectly 4 [1]
WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly 1 [0]
WINE_bar correctly 0@or_broken@ERROR: WINE_bar incorrectly 1 [0]
WINE_foo correctly 5@or_broken@ERROR: WINE_foo incorrectly 0 [5]
WINE_bar correctly 7@or_broken@ERROR: WINE_bar incorrectly  [7]
WINE_foo correctly 5@or_broken@ERROR: WINE_foo incorrectly 0 [5]
WINE_bar correctly 7@or_broken@ERROR: WINE_bar incorrectly  [7]
WINE_foo correctly 19@or_broken@ERROR: WINE_foo incorrectly 0 [19]
WINE_bar correctly 3@or_broken@ERROR: WINE_bar incorrectly  [3]
WINE_baz correctly 4
--- quotes
Jason Edmeades's avatar
Jason Edmeades committed
WINE_foo correctly 1
WINE_foo correctly 1
WINE_foo correctly 1
WINE_bar correctly 2
WINE_foo correctly 1
WINE_bar correctly 2
WINE_foo correctly 1
WINE_bar correctly 2
WINE_foo correctly 1
WINE_bar correctly 2
WINE_foo correctly 1
WINE_bar correctly 2
WINE_baz correctly 3
WINE_foo correctly 1
WINE_bar correctly 2
WINE_baz correctly 3
WINE_foo correctly 1
WINE_bar correctly 2
WINE_baz correctly 3
WINE_foo correctly 1
WINE_bar correctly 2
WINE_baz correctly 3
WINE_foo correctly 1
WINE_bar correctly 2
WINE_baz correctly 3
WINE_foo correctly 1
WINE_foo correctly 1
WINE_bar correctly 5
WINE_baz correctly 2
WINE_foo correctly 18
WINE_foo correctly 3
Jason Edmeades's avatar
Jason Edmeades committed
WINE_bar correctly 7@or_broken@ERROR: WINE_bar incorrectly 4 [7]
--- whitespace are ignored between double char operators
Jason Edmeades's avatar
Jason Edmeades committed
WINE_foo correctly 10@or_broken@ERROR: WINE_foo incorrectly 4 [10]
WINE_bar correctly 50@or_broken@ERROR: WINE_bar incorrectly 5 [50]
WINE_foo correctly 772@or_broken@ERROR: WINE_foo incorrectly 4 [772]
WINE_bar correctly 7720@or_broken@ERROR: WINE_bar incorrectly 5 [7720]
--- invalid operator sequence
4
4
----- negative prefix
Jason Edmeades's avatar
Jason Edmeades committed
WINE_foo correctly -1
WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly  [1]
WINE_foo correctly 6
WINE_foo correctly 0
WINE_foo correctly 6
WINE_foo correctly 2
WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly  [0]
WINE_foo correctly 5
WINE_foo correctly 3@or_broken@ERROR: WINE_foo incorrectly -5 [3]
----- assignment tests involving the end destination
Jason Edmeades's avatar
Jason Edmeades committed
WINE_foo correctly 11@or_broken@ERROR: WINE_foo incorrectly 3 [11]
WINE_foo correctly 6@or_broken@ERROR: WINE_foo incorrectly 2 [6]
WINE_bar correctly 9@or_broken@ERROR: WINE_bar incorrectly  [9]
WINE_foo correctly 6@or_broken@ERROR: WINE_foo incorrectly 2 [6]
WINE_bar correctly 10@or_broken@ERROR: WINE_bar incorrectly  [10]
WINE_baz correctly 7@or_broken@ERROR: WINE_baz incorrectly  [7]
WINE_foo correctly 7@or_broken@ERROR: WINE_foo incorrectly 2 [7]
WINE_bar correctly 7@or_broken@ERROR: WINE_bar incorrectly 2 [7]
----- equal precedence on stack
Jason Edmeades's avatar
Jason Edmeades committed
WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly 0 [1]
WINE_foo correctly 0
WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly  [1]
WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly  [0]
WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly  [1]
WINE_foo correctly -1@or_broken@ERROR: WINE_foo incorrectly  [-1]
WINE_foo correctly -1@or_broken@ERROR: WINE_foo incorrectly  [-1]
WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly  [1]
WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly  [0]
WINE_foo correctly -1
WINE_foo correctly 0@or_broken@ERROR: WINE_foo incorrectly -1 [0]
WINE_foo correctly 0
WINE_foo correctly 1@or_broken@ERROR: WINE_foo incorrectly 0 [1]
WINE_foo correctly -1@or_broken@ERROR: WINE_foo incorrectly 0 [-1]
WINE_foo correctly 25@or_broken@ERROR: WINE_foo incorrectly 20 [25]
WINE_foo correctly 20
WINE_foo correctly 1
WINE_foo correctly 4
WINE_foo correctly 7
WINE_foo correctly 8@or_broken@ERROR: WINE_foo incorrectly 4 [8]
WINE_foo correctly 6@or_broken@ERROR: WINE_foo incorrectly 5 [6]
WINE_bar correctly 6@or_broken@ERROR: WINE_bar incorrectly 5 [6]
a@or_broken@no output
a
a@or_broken@no output
a
a@or_broken@no output
a
a@or_broken@no output
a
a@or_broken@no output
------ fileset argument
--------- basic blank handling
------ command argument
Passed1@or_broken@Missing functionality - Broken1
Passed2@or_broken@Missing functionality - Broken2
Passed3@or_broken@Missing functionality - Broken3
and@or_broken@Broken NT4 functionality1
Line@or_broken@Broken NT4 functionality2
Line@or_broken@Broken NT4 functionality3
no output
a@space@
a d
a
C r
foo bar baz
------ tokens= option
h=%h i=a j=%j k=%k l=%l m=%m o=%o
h=%h i=b j=%j k=%k l=%l m=%m o=%o
h=%h i=a j=c k=e l=f m=g o=%o
h=%h i=a j=e k=f g l=%l m=%m o=%o
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
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
h=%h i=a j=b k=c l=d e f g m=%m n=%n o=%o
h=%h i=a j=b k=c l=d e f g m=%m n=%n o=%o
h=%h i=a j=b k= l= m=%m n=%n o=%o
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
h=%h i=a j=b k= l= m= n=%n o=%o
h=%h i=a j=b k= l= m= n= o=%o
u=a v=b w=c x=d y=e z=f A=%A a=%a
@todo_wine@U=a V=b W=c X=d Y=e Z=f A=%A a=m
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
h=%h i=e j=%j k=%k l=%l m=%m o=%o
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
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
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
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
------------ Testing del ------------
deleting 'file'
errorlevel is 0, good
successfully deleted 'file'
attempting to delete 'file', even though it is not present
errorlevel is 0, good
------------ Testing del /a ------------
not-r.test not found after delete, good
r.test found before delete, good
r.test not found after delete, good
------------ Testing del /q ------------
del /q * succeeded on file1
del /q * succeeded on file2.dat
------------ Testing del /s ------------
------------ Testing rename ------------
foo renamed to bar
bar renamed to foo
read-only file renamed
dir renamed
read-only dir renamed
rename impossible in other directory
original file still present
------------ Testing move ------------
file move succeeded
@todo_wine@file move with overwrite succeeded@or_broken@file overwrite impossible!
@todo_wine@bar@or_broken@baz
read-only files are moveable
file moved in subdirectory
@todo_wine@moving a file to itself is a no-op@or_broken@moving a file to itself should be a no-op!
@todo_wine@ErrorLevel: 0@or_broken@ErrorLevel: 1
simple directory move succeeded
moving a directory to itself gives error; errlevel 1
------------ Testing mkdir ------------
--- creating an already existing directory/file must fail
mkdir ? gives errorlevel 1
mkdir ?\foo gives errorlevel 1
mkdir foo\? gives errorlevel 1
mkdir foo\bar\? gives errorlevel 1
bar created
foobar created
bar\baz created
bazbaz created
zabzab created
------------ Testing rmdir ------------
0
dir removed
0
dir removed
0
0
file not removed
0
non-empty dir not removed
0
non-empty dir not removed
recursive rmdir succeeded
recursive rmdir succeeded
foo removed
bar removed
foobar removed
bar\baz removed
------------ Testing pushd/popd ------------
@drive@@path@foobar\baz
@drive@@path@foobar
@drive@@path@foobar
------------ Testing attrib ------------
A            @drive@@path@foobar\foo@or_broken@A          @drive@@path@foobar\foo@or_broken@A       I    @drive@@path@foobar\foo
A    R       @drive@@path@foobar\foo@or_broken@A    R     @drive@@path@foobar\foo@or_broken@A    R  I    @drive@@path@foobar\foo
foo
foo original contents
Read-only file not deleted
Read-only file forcibly deleted
A            @drive@@path@foobar\baz\level2@or_broken@A          @drive@@path@foobar\baz\level2@or_broken@A       I    @drive@@path@foobar\baz\level2
A    R       @drive@@path@foobar\level1@or_broken@A    R     @drive@@path@foobar\level1@or_broken@A    R  I    @drive@@path@foobar\level1
A    R       @drive@@path@foobar\baz\level2@or_broken@A    R     @drive@@path@foobar\baz\level2@or_broken@A    R  I    @drive@@path@foobar\baz\level2
A            @drive@@path@foobar\bar@or_broken@A          @drive@@path@foobar\bar@or_broken@A       I    @drive@@path@foobar\bar
             @drive@@path@foobar@or_broken@           @drive@@path@foobar@or_broken@        I    @drive@@path@foobar
@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
A            @drive@@path@foobar\baz\toto@or_broken@A          @drive@@path@foobar\baz\toto@or_broken@A       I    @drive@@path@foobar\baz\toto
toto
lulu
file created in read-only dir
------------ Testing assoc ------------
------------ Testing ftype ------------
footype=foo_opencmd
.foo=footype
footype=foo_opencmd
+++
footype=foo_opencmd
@todo_wine@original value@or_broken@buggyXP@or_broken@!WINE_FOO!
------------ Testing CALL ------------
foo@space@@space@
foo bar@space@
foo ""@space@
"" bar@space@
foo ''@space@
'' bar@space@
bar :testRoutine
foo@space@
foo bar
0
foo created
Should expand foobaz
batfile
robinfile
1
1
non-builtin dir
Line one
Line two
Get if
... and else!
passed
------------ Testing SHIFT ------------
'p1' 'p2' 'p3' 'p4' 'p5'
'p2' 'p3' 'p4' 'p5' ''
'p3' 'p4' 'p5' '' ''
'p3' 'p5' '' '' ''
'p3' 'p5' '' '' ''
'p5' '' '' '' ''
------------ Testing cmd invocation ------------
file correctly deleted
---------- Testing copy
Passed: Found expected dummy.file
Passed: Found expected dir1\file1
Passed: Found expected dir1\file1
Passed: Found expected dir1\file99
Passed: Found expected file1
Passed: Did not find dir2
Passed: Did not find dir2\file1
Passed: Found expected dir1\file1
Passed: Found expected dir1\file2
Passed: Found expected dir1\file3
Passed: Found expected dir1\file1
Passed: Found expected dir1\file2
Passed: Found expected dir1\file3
Passed: Found expected file1
Passed: Found expected file2
Passed: Found expected file3
Passed: Did not find dir2
Passed: Did not find dir2\file1
Passed: Did not find dir2\file2
Passed: Did not find dir2\file3
Passed: Found expected testfile
Passed: Found expected testfile
Passed: Found expected testfile
Passed: Found expected testfile
Passed: Found expected testfile
Passed: Found expected dir1\fred
Passed: Found expected dir1\fred
Passed: Found expected fred
Passed: Found expected fred
Passed: file size check on file1 [5]@or_broken@Skipping file size check on NT4
Passed: file size check on file2 [8]@or_broken@Skipping file size check on NT4
Passed: file size check on file3 [11]@or_broken@Skipping file size check on NT4
Passed: file size check on file1_default [5]@or_broken@Skipping file size check on NT4
Passed: file size check on file1_default2 [5]@or_broken@Skipping file size check on NT4
Passed: file size check on file1_plus_eof [6]@or_broken@Skipping file size check on NT4
Passed: file size check on file2_plus_eof [9]@or_broken@Skipping file size check on NT4
Passed: file size check on file3_plus_eof [12]@or_broken@Skipping file size check on NT4
Passed: file size check on file12_plus_eof [14]@or_broken@Skipping file size check on NT4
Passed: file size check on file12_no_eof [13]@or_broken@Skipping file size check on NT4
Passed: file size check on file12_eof2 [14]@or_broken@Skipping file size check on NT4
Passed: file size check on file1_binary_srccopy [6]@or_broken@Skipping file size check on NT4
Passed: file size check on file1_ascii_srccopy [5]@or_broken@Skipping file size check on NT4
Passed: file size check on file123_default_copy [25]@or_broken@Skipping file size check on NT4
Passed: file size check on file123_ascii_copy [25]@or_broken@Skipping file size check on NT4
Passed: file size check on file123_binary_copy [27]@or_broken@Skipping file size check on NT4
Passed: file size check on file123_mixed_copy1 [26]@or_broken@Skipping file size check on NT4
Passed: file size check on file123_mixed_copy2 [27]@or_broken@Skipping file size check on NT4
Passed: file size check on file123_mixed_copy3 [26]@or_broken@Skipping file size check on NT4
Passed: file size check on file123_mixed_copy4 [25]@or_broken@Skipping file size check on NT4
Passed: file size check on file123_mixed_copy5 [28]@or_broken@Skipping file size check on NT4
Passed: file size check on file123_mixed_copy6 [19]@or_broken@Skipping file size check on NT4
Passed: file size check on file123_mixed_copy7 [6]@or_broken@Skipping file size check on NT4
Passed: file size check on file123_mixed_copy8 [7]@or_broken@Skipping file size check on NT4
Passed: errorlevel invalid check 1
Passed: Did not find dir1\file1
Passed: errorlevel invalid check 2
Passed: errorlevel invalid check 3
------------ Testing setlocal/endlocal ------------
@todo_wine@ErrLev:@space@
ErrLev: 0
ErrLev: 0
@todo_wine@ErrLev:@space@@or_broken@ErrLev: 0
ErrLev: 0
--- setlocal within same batch program
Var1 ok 1
Var2 ok 2
Var3 ok 3
Directory is ok 1
Var1 ok 1
Var2 ok 2
Var3 ok 3
Directory is ok 2
Var1 ok 1
Var2 ok 2
Var3 ok 3
Directory is ok 3
--- Mismatched set and end locals
--- Extra setlocal in called batch
value2
2set1endvalue1
--- Extra endlocal in called batch
value2
value2
--- endlocal in called function rather than batch pgm is ineffective
2
2
1
2
1
2
1
1
------------ Testing Errorlevel ------------
1
errorlevel just right, good
errorlevel with leading zero just right, good
errorlevel with negative number OK
abc0def@or_broken@abc1def
errorlevel zero, good@or_broken@errorlevel nonzero, bad
7 should be 7
7 should still be 7
------------ Testing GOTO ------------
goto with no leading space worked
goto with colon and no leading space worked
goto with a leading space worked
goto with a leading tab worked
goto with following amphersands worked
goto with redirections worked
Ignoring double colons worked
label with mixed whitespace and no echo worked
Correctly ignored trailing information
------------ Testing PATH ------------
PATH=original
PATH=try2
PATH=try3
------------ Testing combined CALLs/GOTOs ------------