2010-02-09 19:11:15 +01:00
|
|
|
|
2010-11-05 22:15:45 +01:00
|
|
|
@pwd@>echo Tests for cmd's builtin commands@space@
|
2010-02-16 20:42:18 +01:00
|
|
|
Tests for cmd's builtin commands
|
2010-11-05 22:15:45 +01:00
|
|
|
|
2011-11-29 11:45:51 +01:00
|
|
|
@pwd@>echo ------------ Testing 'echo' [ON] ------------@space@
|
|
|
|
------------ Testing 'echo' [ON] ------------
|
2010-11-05 22:15:45 +01:00
|
|
|
|
|
|
|
@pwd@>echo word@space@
|
|
|
|
word
|
|
|
|
|
|
|
|
@pwd@>echo 'singlequotedword'@space@
|
|
|
|
'singlequotedword'
|
|
|
|
|
|
|
|
@pwd@>echo "doublequotedword"@space@
|
|
|
|
"doublequotedword"
|
|
|
|
at-echoed-word
|
|
|
|
|
|
|
|
@pwd@>echo "/?"@space@
|
|
|
|
"/?"
|
|
|
|
|
2011-08-05 16:29:21 +02:00
|
|
|
@pwd@>echo.
|
2010-11-05 22:15:45 +01:00
|
|
|
|
|
|
|
|
|
|
|
@pwd@>echo .@space@
|
|
|
|
.
|
|
|
|
|
2011-08-05 16:29:21 +02:00
|
|
|
@pwd@>echo.word
|
2010-11-05 22:15:45 +01:00
|
|
|
word
|
|
|
|
|
|
|
|
@pwd@>echo .word@space@
|
|
|
|
.word
|
|
|
|
|
2011-08-05 16:29:21 +02:00
|
|
|
@pwd@>echo:
|
2011-07-28 01:06:47 +02:00
|
|
|
|
2011-07-28 01:06:46 +02:00
|
|
|
|
|
|
|
@pwd@>echo :@space@
|
|
|
|
:
|
|
|
|
|
2011-08-05 16:29:21 +02:00
|
|
|
@pwd@>echo:word
|
2011-07-28 01:06:47 +02:00
|
|
|
word
|
2011-07-28 01:06:46 +02:00
|
|
|
|
|
|
|
@pwd@>echo :word@space@
|
|
|
|
:word
|
|
|
|
|
2015-08-18 15:54:43 +02:00
|
|
|
@pwd@>echo/
|
|
|
|
|
|
|
|
|
|
|
|
@pwd@>echo /@space@
|
|
|
|
/
|
|
|
|
|
|
|
|
@pwd@>echo/word
|
|
|
|
word
|
|
|
|
|
|
|
|
@pwd@>echo /word@space@
|
|
|
|
/word
|
|
|
|
|
2011-08-25 00:48:24 +02:00
|
|
|
@pwd@>echo off now@space@
|
|
|
|
off now
|
|
|
|
|
2010-11-05 22:15:45 +01:00
|
|
|
@pwd@>echo word@space@@space@
|
|
|
|
word@space@
|
|
|
|
|
|
|
|
@pwd@>echo word@space@@space@@space@
|
|
|
|
word@space@@space@
|
2011-08-20 01:26:55 +02:00
|
|
|
|
2012-09-25 23:05:03 +02:00
|
|
|
@pwd@>echo word@space@
|
2011-08-20 01:26:55 +02:00
|
|
|
word
|
|
|
|
|
|
|
|
@pwd@>echo@tab@word@space@
|
2011-08-23 22:54:49 +02:00
|
|
|
word
|
2011-08-20 01:26:55 +02:00
|
|
|
|
|
|
|
@pwd@>echo@tab@word@space@@tab@@space@
|
2011-08-23 22:54:49 +02:00
|
|
|
word@space@@tab@
|
2011-08-20 01:26:55 +02:00
|
|
|
|
|
|
|
@pwd@>echo@tab@word@tab@@space@@space@
|
2011-08-23 22:54:49 +02:00
|
|
|
word@tab@@space@
|
2011-08-20 01:26:55 +02:00
|
|
|
|
2012-09-25 23:05:03 +02:00
|
|
|
@pwd@>echo word@space@
|
2011-08-20 01:26:55 +02:00
|
|
|
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@
|
2011-08-23 22:54:49 +02:00
|
|
|
@tab@word
|
2011-11-11 19:27:43 +01:00
|
|
|
|
|
|
|
@pwd@>echo @tab@ on @space@@space@
|
2012-09-25 23:05:03 +02:00
|
|
|
noecho1
|
|
|
|
noecho2
|
|
|
|
echo3
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing 'echo' [OFF] ------------
|
2010-02-09 19:11:15 +01:00
|
|
|
word
|
|
|
|
'singlequotedword'
|
|
|
|
"doublequotedword"
|
|
|
|
at-echoed-word
|
|
|
|
"/?"
|
|
|
|
|
|
|
|
.
|
2010-09-08 00:59:43 +02:00
|
|
|
word
|
|
|
|
.word
|
2011-07-28 01:06:47 +02:00
|
|
|
|
2011-07-28 01:06:46 +02:00
|
|
|
:
|
2011-07-28 01:06:47 +02:00
|
|
|
word
|
2011-07-28 01:06:46 +02:00
|
|
|
:word
|
2015-08-18 15:54:43 +02:00
|
|
|
|
|
|
|
/
|
|
|
|
word
|
|
|
|
/word
|
2011-08-25 00:48:24 +02:00
|
|
|
on again
|
2010-11-05 22:15:45 +01:00
|
|
|
word@space@
|
|
|
|
word@space@@space@
|
2011-08-20 01:26:55 +02:00
|
|
|
word
|
2011-08-23 22:54:49 +02:00
|
|
|
word
|
|
|
|
word@space@@tab@
|
|
|
|
word@tab@@space@
|
2011-08-20 01:26:55 +02:00
|
|
|
word
|
|
|
|
@tab@word
|
|
|
|
@space@@tab@word
|
2011-08-23 22:54:49 +02:00
|
|
|
@tab@word
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing mixed echo modes ------------
|
2011-08-27 02:11:33 +02:00
|
|
|
@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
|
2012-09-26 01:07:20 +02:00
|
|
|
------------ Testing parameterization ------------
|
|
|
|
'a', 'b', 'c'
|
|
|
|
'"a b c"', '', ''
|
|
|
|
'"a b"\c', '', ''
|
|
|
|
'a', '~`+', '.{}!+b'
|
|
|
|
'a', 'b', ''
|
|
|
|
'"a;b"', '', ''
|
2012-09-25 14:45:28 +02:00
|
|
|
'a', 'b', ''
|
2012-09-26 01:07:20 +02:00
|
|
|
'a[b]{c}(d)e', '', ''
|
|
|
|
'a', '', ''
|
|
|
|
second line
|
|
|
|
'a', 'b', 'c'
|
|
|
|
'a', 'b', 'c'
|
|
|
|
'a', 'b', ''
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing rem ------------
|
2011-08-25 00:48:20 +02:00
|
|
|
|
|
|
|
@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@
|
2011-08-25 00:48:21 +02:00
|
|
|
|
|
|
|
@pwd@>rem @tab@ Hello@space@
|
|
|
|
|
|
|
|
@pwd@>rem@tab@ Hello@space@
|
|
|
|
|
|
|
|
@pwd@>rem@tab@echo foo & echo bar@space@
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing redirection operators ------------
|
2011-11-29 11:46:16 +01:00
|
|
|
--- stdout redirection
|
2011-07-26 21:32:07 +02:00
|
|
|
foo
|
|
|
|
foo@space@
|
2011-08-27 02:11:30 +02:00
|
|
|
foo@tab@
|
|
|
|
foo@space@
|
|
|
|
foo@tab@
|
|
|
|
foo7@space@@or_broken@foo@tab@
|
|
|
|
foo9@space@@or_broken@foo@tab@
|
|
|
|
foo1
|
|
|
|
foo11
|
|
|
|
foo12
|
2012-09-26 01:07:20 +02:00
|
|
|
foo13
|
|
|
|
foo14
|
|
|
|
foo15
|
2011-11-29 11:46:16 +01:00
|
|
|
--- stdout appending
|
2011-07-26 21:32:07 +02:00
|
|
|
foo
|
|
|
|
foo@space@
|
|
|
|
foob@space@
|
|
|
|
foob@space@
|
|
|
|
fooc@space@
|
|
|
|
foob@space@
|
|
|
|
fooc@space@
|
2011-08-27 02:11:30 +02:00
|
|
|
food1
|
|
|
|
foob@space@
|
|
|
|
fooc@space@
|
|
|
|
food1
|
|
|
|
food2
|
|
|
|
food21
|
2011-08-27 02:11:29 +02:00
|
|
|
@todo_wine@foo7@space@@space@@or_broken@not supported@space@
|
|
|
|
@todo_wine@foo@or_broken@not supported
|
2011-11-29 11:46:16 +01:00
|
|
|
--- redirections within IF statements
|
2011-08-27 02:11:32 +02:00
|
|
|
@todo_wine@foo1
|
2011-11-30 13:05:29 +01:00
|
|
|
-----
|
|
|
|
foo2
|
|
|
|
foo3
|
2011-12-02 10:07:27 +01:00
|
|
|
file does not exist, ok
|
2011-08-27 02:11:32 +02:00
|
|
|
foo4
|
|
|
|
baz5
|
|
|
|
baz6@space@
|
|
|
|
baz7
|
|
|
|
baz8
|
|
|
|
baz
|
|
|
|
foo@space@
|
|
|
|
baz
|
|
|
|
foo
|
|
|
|
A
|
|
|
|
B
|
|
|
|
C
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing circumflex escape character ------------
|
2012-09-25 14:45:28 +02:00
|
|
|
hello, world
|
|
|
|
hello, world
|
|
|
|
hell^o, world
|
|
|
|
hell^o, world
|
2012-09-25 22:02:09 +02:00
|
|
|
helloworld
|
|
|
|
hello
|
|
|
|
world
|
|
|
|
hello
|
|
|
|
|
|
|
|
finished
|
2012-09-25 14:45:28 +02:00
|
|
|
baz
|
2011-07-23 20:13:50 +02:00
|
|
|
baz
|
2012-09-25 14:45:28 +02:00
|
|
|
foo | echo bar
|
|
|
|
foo & echo bar
|
|
|
|
bak &
|
2011-12-02 10:07:27 +01:00
|
|
|
baz@space@
|
|
|
|
0@or_broken@1
|
2012-09-25 14:45:28 +02:00
|
|
|
foo > foo
|
|
|
|
<
|
|
|
|
ffoof
|
2012-11-08 23:06:21 +01:00
|
|
|
WINE_FOO=bar | baz
|
2012-09-25 14:45:28 +02:00
|
|
|
0
|
2012-11-08 23:06:21 +01:00
|
|
|
WINE_FOO=bar ^| baz
|
2012-09-25 14:45:28 +02:00
|
|
|
bar | baz
|
|
|
|
0
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing 'set' ------------
|
2011-07-17 22:48:56 +02:00
|
|
|
1
|
2012-09-06 00:41:48 +02:00
|
|
|
0
|
2012-11-08 23:06:21 +01:00
|
|
|
WINE_FOOBAR not defined
|
2012-09-06 01:09:23 +02:00
|
|
|
baz
|
2012-11-08 23:06:21 +01:00
|
|
|
WINE_FOOBAR = baz
|
2012-09-06 00:41:48 +02:00
|
|
|
0
|
2012-09-06 01:09:23 +02:00
|
|
|
baz2
|
2012-09-06 00:41:48 +02:00
|
|
|
0
|
2011-07-17 22:48:56 +02:00
|
|
|
bar
|
2012-11-08 23:06:21 +01:00
|
|
|
WINE_FOOBAR= bar
|
|
|
|
WINE_FOOBAR = baz2
|
|
|
|
WINE_FOOBAR = baz2
|
|
|
|
WINE_FOOBAR not defined
|
2011-07-17 22:48:56 +02:00
|
|
|
1
|
|
|
|
bar
|
|
|
|
foobar
|
2012-11-08 23:06:21 +01:00
|
|
|
WINE_FOO not defined
|
|
|
|
WINE_BAZ=bazbaz
|
2011-07-17 22:48:56 +02:00
|
|
|
bazbaz
|
2012-11-08 23:06:21 +01:00
|
|
|
set "WINE_FOO=bar" should not include the quotes in the variable value
|
2010-02-16 21:25:41 +01:00
|
|
|
bar
|
2011-08-25 00:48:19 +02:00
|
|
|
foo
|
|
|
|
''
|
2011-08-20 01:26:55 +02:00
|
|
|
'foo@space@'
|
|
|
|
'foo@tab@'
|
2013-06-03 23:38:15 +02:00
|
|
|
'value@space@'
|
|
|
|
'value'
|
|
|
|
'jim fred'
|
|
|
|
'"jim" fred'
|
|
|
|
'jim fred'
|
|
|
|
'jim'
|
|
|
|
'apple"banana"grape'
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing variable expansion ------------
|
2014-03-11 00:16:27 +01:00
|
|
|
~p0 should be path containing batch file
|
|
|
|
@path@
|
|
|
|
@path@
|
2010-02-16 21:44:16 +01:00
|
|
|
~dp0 should be directory containing batch file
|
2014-03-11 00:16:28 +01:00
|
|
|
@drive@@path@
|
|
|
|
@drive@@path@
|
2011-07-28 01:06:45 +02:00
|
|
|
CD value @pwd@@or_broken@CD value@space@
|
2010-03-09 13:15:35 +01:00
|
|
|
%
|
|
|
|
P
|
|
|
|
P
|
|
|
|
S
|
|
|
|
P
|
|
|
|
PS
|
|
|
|
ERRORLEVEL
|
|
|
|
0
|
|
|
|
00
|
2010-03-16 10:54:26 +01:00
|
|
|
0ERRORLEVEL
|
2010-03-09 13:15:35 +01:00
|
|
|
0
|
|
|
|
0%
|
|
|
|
P0
|
|
|
|
0S
|
|
|
|
P0S
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing variable substrings ------------
|
2011-08-25 14:22:29 +02:00
|
|
|
q
|
|
|
|
qwe
|
|
|
|
er
|
2012-10-25 22:17:13 +02:00
|
|
|
'ty'@or_broken@''
|
2011-08-25 14:22:29 +02:00
|
|
|
't'@or_broken@''
|
|
|
|
ert@or_broken@qwerty
|
|
|
|
e@or_broken@qwerty
|
|
|
|
''@or_broken@'qwerty'
|
|
|
|
r@or_broken@qwerty
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing variable substitution ------------
|
2011-11-29 11:46:16 +01:00
|
|
|
--- in FOR variables
|
2012-09-26 01:07:20 +02:00
|
|
|
"A B"
|
2011-08-26 01:19:28 +02:00
|
|
|
C
|
2012-09-25 23:05:03 +02:00
|
|
|
"A B"
|
|
|
|
C
|
2011-08-26 01:19:28 +02:00
|
|
|
'A B'@or_broken@''
|
|
|
|
'C'@or_broken@''
|
2014-03-11 00:16:28 +01:00
|
|
|
@drive@@path@C D@or_broken@%~ff
|
|
|
|
@drive@@path@E@or_broken@%~ff
|
2011-08-26 01:19:28 +02:00
|
|
|
@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@''
|
2012-10-11 23:53:38 +02:00
|
|
|
''@or_broken@'%~ai'
|
|
|
|
''@or_broken@'%~ai'
|
2015-11-19 16:25:35 +01:00
|
|
|
'--a------'@or_broken@'--a--------'@or_broken@'%~ai'
|
2012-10-11 23:53:38 +02:00
|
|
|
'5'@or_broken@'%~zi'
|
|
|
|
''@or_broken@'%~ti'
|
|
|
|
''@or_broken@'%~ti'
|
|
|
|
''@or_broken@'%~zi'
|
|
|
|
''@or_broken@'%~zi'
|
2011-08-26 01:19:28 +02:00
|
|
|
@drive@@path@
|
|
|
|
@drive@@path@
|
|
|
|
@drive@
|
|
|
|
@drive@
|
|
|
|
@drive@
|
|
|
|
@drive@
|
|
|
|
''
|
|
|
|
'.eh'
|
2013-06-02 22:29:58 +02:00
|
|
|
',,,,,,,,,'
|
2011-11-29 11:46:16 +01:00
|
|
|
--- in parameters
|
2012-09-26 01:07:20 +02:00
|
|
|
"A B"
|
2011-08-26 01:19:28 +02:00
|
|
|
C
|
2012-09-26 01:07:20 +02:00
|
|
|
'A B'@or_broken@''
|
2011-08-26 01:19:28 +02:00
|
|
|
'C'@or_broken@''
|
2014-03-11 00:16:28 +01:00
|
|
|
@drive@@path@C D
|
|
|
|
@drive@@path@E
|
2011-08-26 01:19:28 +02:00
|
|
|
@drive@
|
|
|
|
@drive@
|
|
|
|
@path@
|
|
|
|
@path@
|
2012-09-26 01:07:20 +02:00
|
|
|
L M
|
2011-08-26 01:19:28 +02:00
|
|
|
N
|
2012-09-26 01:07:20 +02:00
|
|
|
'.OOL'
|
2011-08-26 01:19:28 +02:00
|
|
|
'.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@''
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing variable delayed expansion ------------
|
2011-11-29 11:46:16 +01:00
|
|
|
--- default mode (load-time expansion)
|
2011-08-01 11:46:53 +02:00
|
|
|
foo
|
2012-11-08 23:06:21 +01:00
|
|
|
!WINE_FOO!
|
2011-08-01 11:46:53 +02:00
|
|
|
foo
|
|
|
|
foo
|
2011-11-29 11:46:16 +01:00
|
|
|
--- runtime (delayed) expansion mode
|
2011-08-01 11:46:53 +02:00
|
|
|
foo
|
2013-01-07 00:06:28 +01:00
|
|
|
foo@or_broken@!WINE_FOO!
|
2011-08-01 11:46:53 +02:00
|
|
|
foo
|
2013-01-07 00:06:28 +01:00
|
|
|
bar@or_broken@foo
|
2011-08-01 11:46:53 +02:00
|
|
|
0
|
|
|
|
0@or_broken@1
|
|
|
|
foo
|
2012-11-08 23:06:21 +01:00
|
|
|
!WINE_FOO!
|
2011-11-29 11:46:16 +01:00
|
|
|
--- using /V cmd flag
|
2011-08-02 10:10:52 +02:00
|
|
|
foo
|
2013-01-07 00:06:28 +01:00
|
|
|
foo@or_broken@!WINE_FOO!
|
2011-08-02 10:10:52 +02:00
|
|
|
foo
|
2012-11-08 23:06:21 +01:00
|
|
|
!WINE_FOO!
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing conditional execution ------------
|
2011-11-29 11:46:16 +01:00
|
|
|
--- unconditional ampersand
|
2011-07-23 15:34:20 +02:00
|
|
|
foo1
|
|
|
|
bar2@space@
|
|
|
|
foo2
|
2011-08-27 02:11:28 +02:00
|
|
|
foobar deleted
|
2011-11-29 11:46:16 +01:00
|
|
|
--- on success conditional and
|
2011-07-23 15:34:21 +02:00
|
|
|
@todo_wine@foo3 not created
|
|
|
|
bar4@space@
|
|
|
|
foo4
|
2011-11-29 11:46:16 +01:00
|
|
|
--- on failure conditional or
|
|
|
|
foo5
|
|
|
|
foo6@space@
|
|
|
|
@todo_wine@------------ Testing cd ------------
|
2011-08-20 01:59:00 +02:00
|
|
|
singleFile
|
2014-03-11 00:16:28 +01:00
|
|
|
Current dir: @drive@@path@foobar@or_broken@Current dir:@space@
|
|
|
|
@drive@@path@foobar
|
2011-08-20 01:59:00 +02:00
|
|
|
@pwd@
|
2014-03-11 00:16:28 +01:00
|
|
|
@drive@@path@foobar
|
2011-08-20 01:59:00 +02:00
|
|
|
@pwd@
|
2014-03-11 00:16:28 +01:00
|
|
|
@drive@@path@foobar
|
2011-08-20 01:59:00 +02:00
|
|
|
@pwd@
|
2011-08-27 02:11:28 +02:00
|
|
|
@pwd@
|
|
|
|
@pwd@
|
2014-03-11 00:16:28 +01:00
|
|
|
@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
|
2011-08-20 01:59:00 +02:00
|
|
|
@pwd@
|
2014-03-11 00:16:28 +01:00
|
|
|
@drive@@path@foobar
|
2011-07-14 20:07:14 +02:00
|
|
|
------------ Testing type ------------
|
|
|
|
|
|
|
|
@pwd@>type foobaz@space@
|
|
|
|
bar
|
|
|
|
|
2011-11-29 11:46:16 +01:00
|
|
|
@pwd@>echo ---@space@
|
|
|
|
---
|
2011-07-14 20:07:14 +02:00
|
|
|
bar
|
2012-09-26 01:07:20 +02:00
|
|
|
---1
|
|
|
|
bar
|
|
|
|
---2
|
|
|
|
bar
|
|
|
|
---3
|
2011-07-19 09:49:24 +02:00
|
|
|
------------ Testing NUL ------------
|
|
|
|
bar
|
|
|
|
bar
|
|
|
|
bar
|
|
|
|
NUL
|
2012-11-09 23:36:30 +01:00
|
|
|
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
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing if/else ------------
|
2012-10-23 03:10:23 +02:00
|
|
|
--- if/else should work with blocks
|
2010-02-18 08:11:04 +01:00
|
|
|
if seems to work
|
|
|
|
else seems to work
|
2011-09-06 19:19:44 +02:00
|
|
|
if seems not to detect /c as parameter
|
2015-06-24 20:10:04 +02:00
|
|
|
else if seems to work
|
|
|
|
else if seems to work
|
|
|
|
else if seems to work
|
2012-10-23 03:10:23 +02:00
|
|
|
--- case sensitivity with and without /i option
|
2010-02-19 06:39:32 +01:00
|
|
|
if seems to default to case sensitivity
|
|
|
|
if /i seems to work
|
|
|
|
if /I seems to work
|
2012-10-23 03:10:23 +02:00
|
|
|
--- string comparisons
|
2011-09-04 16:33:29 +02:00
|
|
|
equal
|
2011-09-06 19:19:44 +02:00
|
|
|
non equal
|
|
|
|
non equal
|
2011-09-04 16:33:29 +02:00
|
|
|
equal
|
2012-10-23 03:10:23 +02:00
|
|
|
--- tabs handling
|
2011-08-25 00:48:22 +02:00
|
|
|
doom
|
|
|
|
doom
|
|
|
|
doom
|
|
|
|
lol
|
|
|
|
quake
|
|
|
|
quake
|
|
|
|
quake
|
2012-10-23 03:10:23 +02:00
|
|
|
--- comparison operators
|
|
|
|
------ for strings
|
|
|
|
LSS string can be used as operand for LSS comparison
|
2012-10-25 23:48:02 +02:00
|
|
|
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
|
2012-11-07 00:51:17 +01:00
|
|
|
A LSS AA
|
2012-10-25 23:48:02 +02:00
|
|
|
B LSS BA
|
2012-11-07 00:51:17 +01:00
|
|
|
AB LSS B
|
2012-10-25 23:48:02 +02:00
|
|
|
AB LSS BA
|
2012-11-07 00:51:17 +01:00
|
|
|
AA LSS B
|
|
|
|
AA LSS AB
|
2012-10-25 23:48:02 +02:00
|
|
|
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
|
2012-10-25 23:48:03 +02:00
|
|
|
A LEQ A
|
|
|
|
A LEQ B
|
|
|
|
A LEQ AB
|
|
|
|
A LEQ BA
|
2012-11-07 00:51:17 +01:00
|
|
|
A LEQ AA
|
|
|
|
B LEQ B
|
2012-10-25 23:48:03 +02:00
|
|
|
B LEQ BA
|
2012-11-07 00:51:17 +01:00
|
|
|
AB LEQ B
|
|
|
|
AB LEQ AB
|
2012-10-25 23:48:03 +02:00
|
|
|
AB LEQ BA
|
|
|
|
BA LEQ BA
|
2012-11-07 00:51:17 +01:00
|
|
|
AA LEQ B
|
|
|
|
AA LEQ AB
|
2012-10-25 23:48:03 +02:00
|
|
|
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
|
2012-10-25 23:48:04 +02:00
|
|
|
A EQU A
|
|
|
|
B EQU B
|
|
|
|
AB EQU AB
|
|
|
|
BA EQU BA
|
|
|
|
AA EQU AA
|
|
|
|
A EQU a insensitive
|
2012-10-25 23:48:05 +02:00
|
|
|
A NEQ B
|
|
|
|
A NEQ AB
|
|
|
|
A NEQ BA
|
|
|
|
A NEQ AA
|
2012-11-07 00:51:17 +01:00
|
|
|
B NEQ A
|
|
|
|
B NEQ AB
|
|
|
|
B NEQ BA
|
2012-10-25 23:48:05 +02:00
|
|
|
B NEQ AA
|
2012-11-07 00:51:17 +01:00
|
|
|
AB NEQ A
|
|
|
|
AB NEQ B
|
|
|
|
AB NEQ BA
|
2012-10-25 23:48:05 +02:00
|
|
|
AB NEQ AA
|
2012-11-07 00:51:17 +01:00
|
|
|
BA NEQ A
|
|
|
|
BA NEQ B
|
|
|
|
BA NEQ AB
|
2012-10-25 23:48:05 +02:00
|
|
|
BA NEQ AA
|
2012-11-07 00:51:17 +01:00
|
|
|
AA NEQ A
|
|
|
|
AA NEQ B
|
|
|
|
AA NEQ AB
|
|
|
|
AA NEQ BA
|
2012-10-25 23:48:06 +02:00
|
|
|
A GEQ A
|
|
|
|
B GEQ A
|
|
|
|
B GEQ B
|
|
|
|
B GEQ AB
|
2012-11-07 00:51:17 +01:00
|
|
|
B GEQ AA
|
|
|
|
AB GEQ A
|
2012-10-25 23:48:06 +02:00
|
|
|
AB GEQ AB
|
2012-11-07 00:51:17 +01:00
|
|
|
AB GEQ AA
|
|
|
|
BA GEQ A
|
|
|
|
BA GEQ B
|
2012-10-25 23:48:06 +02:00
|
|
|
BA GEQ AB
|
|
|
|
BA GEQ BA
|
|
|
|
BA GEQ AA
|
2012-11-07 00:51:17 +01:00
|
|
|
AA GEQ A
|
2012-10-25 23:48:06 +02:00
|
|
|
AA GEQ AA
|
2012-10-25 23:48:07 +02:00
|
|
|
B GTR A
|
2012-11-07 00:51:17 +01:00
|
|
|
B GTR AB
|
|
|
|
B GTR AA
|
2012-10-25 23:48:07 +02:00
|
|
|
AB GTR A
|
2012-11-07 00:51:17 +01:00
|
|
|
AB GTR AA
|
2012-10-25 23:48:07 +02:00
|
|
|
BA GTR A
|
|
|
|
BA GTR B
|
|
|
|
BA GTR AB
|
|
|
|
BA GTR AA
|
2012-11-07 00:51:17 +01:00
|
|
|
AA GTR A
|
2012-10-23 03:10:23 +02:00
|
|
|
------ for numbers
|
|
|
|
negative numbers handled
|
|
|
|
negative numbers handled
|
|
|
|
octal handled
|
|
|
|
also in negative form
|
|
|
|
hexa handled
|
|
|
|
also in negative form
|
|
|
|
11 LSS 101
|
2012-10-25 23:48:02 +02:00
|
|
|
0 LSS 1
|
|
|
|
0 LSS 10
|
|
|
|
0 LSS 9
|
2012-11-07 00:51:17 +01:00
|
|
|
1 LSS 10
|
2012-10-25 23:48:02 +02:00
|
|
|
1 LSS 9
|
2012-11-07 00:51:17 +01:00
|
|
|
9 LSS 10
|
2012-10-25 23:48:03 +02:00
|
|
|
0 LEQ 0
|
|
|
|
0 LEQ 1
|
|
|
|
0 LEQ 10
|
2012-11-07 00:51:17 +01:00
|
|
|
0 LEQ 9
|
|
|
|
1 LEQ 1
|
2012-10-25 23:48:03 +02:00
|
|
|
1 LEQ 10
|
2012-11-07 00:51:17 +01:00
|
|
|
1 LEQ 9
|
2012-10-25 23:48:03 +02:00
|
|
|
10 LEQ 10
|
|
|
|
9 LEQ 10
|
|
|
|
9 LEQ 9
|
2012-10-25 23:48:04 +02:00
|
|
|
0 EQU 0
|
|
|
|
1 EQU 1
|
|
|
|
10 EQU 10
|
|
|
|
9 EQU 9
|
|
|
|
octal ok
|
|
|
|
hexa ok
|
|
|
|
string/hexa compare ok
|
|
|
|
string/hexa compare ok
|
2012-10-25 23:48:05 +02:00
|
|
|
0 NEQ 1
|
|
|
|
0 NEQ 10
|
|
|
|
0 NEQ 9
|
2012-11-07 00:51:17 +01:00
|
|
|
1 NEQ 0
|
|
|
|
1 NEQ 10
|
2012-10-25 23:48:05 +02:00
|
|
|
1 NEQ 9
|
2012-11-07 00:51:17 +01:00
|
|
|
10 NEQ 0
|
|
|
|
10 NEQ 1
|
2012-10-25 23:48:05 +02:00
|
|
|
10 NEQ 9
|
2012-11-07 00:51:17 +01:00
|
|
|
9 NEQ 0
|
|
|
|
9 NEQ 1
|
|
|
|
9 NEQ 10
|
2012-10-25 23:48:06 +02:00
|
|
|
0 GEQ 0
|
|
|
|
1 GEQ 0
|
|
|
|
1 GEQ 1
|
2012-11-07 00:51:17 +01:00
|
|
|
10 GEQ 0
|
2012-10-25 23:48:06 +02:00
|
|
|
10 GEQ 1
|
|
|
|
10 GEQ 10
|
|
|
|
10 GEQ 9
|
2012-11-07 00:51:17 +01:00
|
|
|
9 GEQ 0
|
|
|
|
9 GEQ 1
|
2012-10-25 23:48:06 +02:00
|
|
|
9 GEQ 9
|
2012-10-25 23:48:07 +02:00
|
|
|
1 GTR 0
|
|
|
|
10 GTR 0
|
|
|
|
10 GTR 1
|
|
|
|
10 GTR 9
|
2012-11-07 00:51:17 +01:00
|
|
|
9 GTR 0
|
|
|
|
9 GTR 1
|
2012-10-23 03:10:29 +02:00
|
|
|
------ for numbers and stringified numbers
|
|
|
|
strings and integers not equal
|
|
|
|
strings and integers not equal
|
|
|
|
foo
|
2012-10-25 23:48:06 +02:00
|
|
|
"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"
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing for ------------
|
2011-11-29 11:46:16 +01:00
|
|
|
--- plain FOR
|
2011-07-11 23:34:05 +02:00
|
|
|
A
|
|
|
|
B
|
|
|
|
C
|
2011-07-28 01:06:48 +02:00
|
|
|
%I
|
|
|
|
%I
|
|
|
|
%I
|
|
|
|
%j
|
|
|
|
%j
|
|
|
|
%j
|
2011-07-11 23:34:05 +02:00
|
|
|
A
|
|
|
|
B
|
|
|
|
C
|
2011-07-28 01:06:48 +02:00
|
|
|
1
|
|
|
|
4
|
|
|
|
1
|
|
|
|
A
|
|
|
|
B
|
|
|
|
C
|
2011-08-20 01:58:57 +02:00
|
|
|
X
|
2011-08-23 22:54:50 +02:00
|
|
|
X2
|
|
|
|
X3
|
2011-08-20 01:26:55 +02:00
|
|
|
foo
|
2011-08-23 22:54:50 +02:00
|
|
|
M
|
|
|
|
X
|
|
|
|
M
|
|
|
|
N
|
|
|
|
O
|
2011-08-25 23:08:31 +02:00
|
|
|
`echo
|
|
|
|
A
|
|
|
|
B`
|
|
|
|
'echo
|
|
|
|
A
|
|
|
|
B'
|
2012-09-26 01:07:20 +02:00
|
|
|
"echo A B"
|
|
|
|
"A B"
|
2011-08-25 23:08:31 +02:00
|
|
|
C
|
2011-11-29 11:46:16 +01:00
|
|
|
--- imbricated FORs
|
2012-11-05 22:43:08 +01:00
|
|
|
X Y
|
|
|
|
X Y
|
|
|
|
A C
|
|
|
|
A D
|
|
|
|
B C
|
|
|
|
B D
|
|
|
|
A C
|
|
|
|
A D
|
|
|
|
B C
|
|
|
|
B D
|
2011-11-29 11:46:16 +01:00
|
|
|
--- basic wildcards
|
2011-07-28 01:06:48 +02:00
|
|
|
bazbaz
|
2011-11-29 11:46:16 +01:00
|
|
|
--- for /d
|
2012-09-04 22:11:51 +02:00
|
|
|
baz@space@
|
|
|
|
foo@space@
|
|
|
|
bar@space@
|
|
|
|
PASSED
|
|
|
|
xxx - Should be xxx
|
|
|
|
Expected second line
|
2012-09-27 20:58:56 +02:00
|
|
|
--- 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
|
2013-06-04 01:29:51 +02:00
|
|
|
--- Complex wildcards unix and windows slash
|
|
|
|
Windows slashs, valid path
|
|
|
|
ASIS: foobar\baz\bazbaz
|
|
|
|
WC : foobar\baz\bazbaz
|
|
|
|
Windows slashs, invalid path
|
|
|
|
ASIS: foobar\jim\bazbaz
|
|
|
|
Unix slashs, valid path
|
|
|
|
ASIS: foobar/baz/bazbaz
|
|
|
|
WC : bazbaz
|
|
|
|
Unix slashs, invalid path
|
|
|
|
ASIS: foobar/jim/bazbaz
|
|
|
|
Done
|
2011-11-29 11:46:16 +01:00
|
|
|
--- for /L
|
2011-07-29 13:59:52 +02:00
|
|
|
1
|
|
|
|
3
|
|
|
|
5
|
|
|
|
1
|
|
|
|
3
|
|
|
|
5
|
|
|
|
0
|
|
|
|
2
|
|
|
|
1
|
|
|
|
-1
|
2012-09-03 00:25:21 +02:00
|
|
|
ErrorLevel 0
|
|
|
|
ErrorLevel 0
|
2012-09-02 23:08:57 +02:00
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
1
|
|
|
|
3
|
|
|
|
4
|
|
|
|
3
|
|
|
|
2
|
|
|
|
1
|
|
|
|
4
|
|
|
|
2
|
|
|
|
0
|
|
|
|
1
|
|
|
|
1
|
|
|
|
-1
|
|
|
|
-1
|
|
|
|
1
|
|
|
|
3
|
2012-12-12 01:30:45 +01:00
|
|
|
--- set /a
|
2011-11-29 11:46:16 +01:00
|
|
|
------ individual operations
|
2012-12-21 00:38:14 +01:00
|
|
|
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
|
2011-11-29 11:46:16 +01:00
|
|
|
------ precedence and grouping
|
2012-12-21 00:38:14 +01:00
|
|
|
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]
|
2011-11-29 11:46:16 +01:00
|
|
|
------ octal and hexadecimal
|
2012-12-21 00:38:14 +01:00
|
|
|
WINE_foo correctly 18
|
|
|
|
WINE_foo correctly 18
|
|
|
|
WINE_foo correctly 15
|
|
|
|
WINE_foo correctly 3
|
2011-11-29 11:46:16 +01:00
|
|
|
------ variables
|
2012-12-21 00:38:14 +01:00
|
|
|
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
|
2012-12-12 01:30:45 +01:00
|
|
|
WINE_bar correctly 4
|
2012-12-21 00:38:14 +01:00
|
|
|
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]
|
2012-12-12 01:30:45 +01:00
|
|
|
WINE_baz correctly 4
|
2012-12-13 21:47:16 +01:00
|
|
|
--- quotes
|
2012-12-21 00:38:14 +01:00
|
|
|
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
|
2012-12-13 21:47:16 +01:00
|
|
|
WINE_foo correctly 3
|
2012-12-21 00:38:14 +01:00
|
|
|
WINE_bar correctly 7@or_broken@ERROR: WINE_bar incorrectly 4 [7]
|
2012-12-13 21:47:16 +01:00
|
|
|
--- whitespace are ignored between double char operators
|
2012-12-21 00:38:14 +01:00
|
|
|
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]
|
2012-12-13 21:47:16 +01:00
|
|
|
--- invalid operator sequence
|
|
|
|
4
|
|
|
|
4
|
|
|
|
----- negative prefix
|
2012-12-21 00:38:14 +01:00
|
|
|
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]
|
2012-12-13 21:47:16 +01:00
|
|
|
----- assignment tests involving the end destination
|
2012-12-21 00:38:14 +01:00
|
|
|
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]
|
2012-12-13 21:47:16 +01:00
|
|
|
----- equal precedence on stack
|
2012-12-21 00:38:14 +01:00
|
|
|
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]
|
2011-11-29 11:46:16 +01:00
|
|
|
--- for /F
|
|
|
|
------ string argument
|
2011-08-25 23:08:32 +02:00
|
|
|
a
|
2012-10-23 22:35:05 +02:00
|
|
|
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
|
2011-11-29 11:46:16 +01:00
|
|
|
------ fileset argument
|
|
|
|
--------- basic blank handling
|
2011-08-25 23:08:32 +02:00
|
|
|
a
|
|
|
|
a
|
|
|
|
a
|
|
|
|
a
|
|
|
|
a
|
|
|
|
b
|
2011-11-29 11:46:16 +01:00
|
|
|
--------- multi-line with empty lines
|
2011-08-25 23:08:32 +02:00
|
|
|
a
|
|
|
|
b
|
|
|
|
c
|
2011-11-29 11:46:16 +01:00
|
|
|
--------- multiple files
|
2011-08-25 23:08:32 +02:00
|
|
|
a
|
|
|
|
b
|
|
|
|
c
|
|
|
|
q
|
|
|
|
kkk
|
|
|
|
q
|
|
|
|
kkk
|
|
|
|
a
|
|
|
|
b
|
|
|
|
c
|
2012-10-22 23:22:28 +02:00
|
|
|
------ command argument
|
|
|
|
Passed1@or_broken@Missing functionality - Broken1
|
|
|
|
Passed2@or_broken@Missing functionality - Broken2
|
|
|
|
Passed3@or_broken@Missing functionality - Broken3
|
2011-11-29 11:46:16 +01:00
|
|
|
------ eol option
|
2012-10-22 02:00:11 +02:00
|
|
|
and@or_broken@Broken NT4 functionality1
|
|
|
|
Line@or_broken@Broken NT4 functionality2
|
|
|
|
Line@or_broken@Broken NT4 functionality3
|
2012-10-23 22:35:05 +02:00
|
|
|
ad
|
|
|
|
z@y
|
2012-09-26 15:37:56 +02:00
|
|
|
a|d
|
2012-10-23 22:35:05 +02:00
|
|
|
no output
|
2012-10-23 23:05:06 +02:00
|
|
|
no output
|
2011-11-29 11:46:16 +01:00
|
|
|
------ delims option
|
2012-10-23 22:35:05 +02:00
|
|
|
a
|
2012-10-23 23:05:06 +02:00
|
|
|
a@space@
|
|
|
|
a d
|
|
|
|
a
|
|
|
|
C r
|
|
|
|
foo bar baz
|
2011-08-25 23:08:34 +02:00
|
|
|
@todo_wine@c:\
|
2011-11-29 11:46:16 +01:00
|
|
|
------ skip option
|
2012-10-22 00:46:46 +02:00
|
|
|
c
|
|
|
|
no output
|
|
|
|
no output
|
|
|
|
c
|
|
|
|
c
|
|
|
|
no output
|
2012-11-08 22:53:08 +01:00
|
|
|
------ 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
|
2015-11-17 05:21:39 +01:00
|
|
|
------------ 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
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing del /a ------------
|
2011-05-22 17:27:38 +02:00
|
|
|
not-r.test not found after delete, good
|
|
|
|
r.test found before delete, good
|
|
|
|
r.test not found after delete, good
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing del /q ------------
|
2011-05-30 05:19:00 +02:00
|
|
|
del /q * succeeded on file1
|
|
|
|
del /q * succeeded on file2.dat
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing del /s ------------
|
2011-09-14 23:39:10 +02:00
|
|
|
------------ Testing rename ------------
|
2011-11-29 11:46:16 +01:00
|
|
|
--- ren and rename are synonymous
|
2011-09-14 23:39:10 +02:00
|
|
|
foo renamed to bar
|
|
|
|
bar renamed to foo
|
2011-11-29 11:46:16 +01:00
|
|
|
--- name collision
|
2011-09-14 23:39:10 +02:00
|
|
|
foo
|
|
|
|
bar
|
2011-11-29 11:46:16 +01:00
|
|
|
--- rename read-only files
|
2011-10-14 15:37:59 +02:00
|
|
|
read-only file renamed
|
2011-11-29 11:46:16 +01:00
|
|
|
--- rename directories
|
2011-10-14 15:37:57 +02:00
|
|
|
dir renamed
|
|
|
|
read-only dir renamed
|
2011-11-29 11:46:16 +01:00
|
|
|
--- rename in other directory
|
2012-09-03 23:48:08 +02:00
|
|
|
rename impossible in other directory
|
|
|
|
original file still present
|
2011-10-11 19:04:31 +02:00
|
|
|
------------ Testing move ------------
|
2011-11-29 11:46:16 +01:00
|
|
|
--- file move
|
2011-10-11 19:04:31 +02:00
|
|
|
file move succeeded
|
|
|
|
@todo_wine@file move with overwrite succeeded@or_broken@file overwrite impossible!
|
|
|
|
@todo_wine@bar@or_broken@baz
|
2011-10-13 17:30:17 +02:00
|
|
|
read-only files are moveable
|
2011-10-11 19:04:31 +02:00
|
|
|
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
|
2011-11-29 11:46:16 +01:00
|
|
|
--- directory move
|
2011-10-11 19:04:31 +02:00
|
|
|
simple directory move succeeded
|
|
|
|
moving a directory to itself gives error; errlevel 1
|
2011-11-29 11:46:16 +01:00
|
|
|
------ dir in dir move
|
2011-10-11 19:04:31 +02:00
|
|
|
foo
|
|
|
|
bar2
|
|
|
|
foo2
|
2011-09-14 23:39:10 +02:00
|
|
|
------------ Testing mkdir ------------
|
2011-11-29 11:46:16 +01:00
|
|
|
--- md and mkdir are synonymous
|
2011-07-11 23:34:06 +02:00
|
|
|
0
|
|
|
|
0
|
2011-11-29 11:46:16 +01:00
|
|
|
--- creating an already existing directory/file must fail
|
2011-08-02 21:35:36 +02:00
|
|
|
1
|
|
|
|
1
|
2011-11-29 11:46:16 +01:00
|
|
|
--- multilevel path creation
|
2011-07-11 23:34:06 +02:00
|
|
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
0
|
|
|
|
0
|
2011-08-02 21:35:36 +02:00
|
|
|
1
|
2011-07-11 23:34:06 +02:00
|
|
|
0
|
|
|
|
0
|
2011-11-29 11:46:16 +01:00
|
|
|
--- trailing backslashes
|
2011-07-11 23:34:07 +02:00
|
|
|
0
|
|
|
|
dir created
|
|
|
|
0
|
2011-11-29 11:46:16 +01:00
|
|
|
--- invalid chars
|
2011-08-02 21:21:31 +02:00
|
|
|
mkdir ? gives errorlevel 1
|
|
|
|
mkdir ?\foo gives errorlevel 1
|
|
|
|
mkdir foo\? gives errorlevel 1
|
2011-08-02 21:35:36 +02:00
|
|
|
ok, foo created
|
2011-08-02 21:21:31 +02:00
|
|
|
mkdir foo\bar\? gives errorlevel 1
|
2011-08-02 21:35:36 +02:00
|
|
|
ok, foo\bar created
|
2011-11-29 11:46:16 +01:00
|
|
|
--- multiple directories at once
|
2011-07-24 22:11:35 +02:00
|
|
|
foo created
|
2011-08-02 22:02:19 +02:00
|
|
|
bar created
|
|
|
|
foobar created
|
|
|
|
bar\baz created
|
2012-09-26 01:07:20 +02:00
|
|
|
bazbaz created
|
|
|
|
zabzab created
|
2011-08-02 21:35:36 +02:00
|
|
|
mkdir foo\* errorlevel 1
|
|
|
|
ok, foo created
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing rmdir ------------
|
2011-07-11 23:34:08 +02:00
|
|
|
0
|
|
|
|
dir removed
|
|
|
|
0
|
|
|
|
dir removed
|
|
|
|
0
|
|
|
|
0
|
|
|
|
file not removed
|
|
|
|
0
|
|
|
|
non-empty dir not removed
|
|
|
|
0
|
|
|
|
non-empty dir not removed
|
2011-07-19 09:49:25 +02:00
|
|
|
recursive rmdir succeeded
|
|
|
|
recursive rmdir succeeded
|
2011-07-24 22:11:36 +02:00
|
|
|
foo removed
|
|
|
|
bar removed
|
|
|
|
foobar removed
|
|
|
|
bar\baz removed
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing pushd/popd ------------
|
2011-08-30 23:33:52 +02:00
|
|
|
@pwd@
|
2011-11-29 11:46:16 +01:00
|
|
|
--- popd is no-op when dir stack is empty
|
2011-08-30 23:33:52 +02:00
|
|
|
@pwd@
|
2011-11-29 11:46:16 +01:00
|
|
|
--- pushing non-existing dir
|
2011-08-30 23:33:52 +02:00
|
|
|
@pwd@
|
2011-11-29 11:46:16 +01:00
|
|
|
--- basic behaviour
|
2014-03-11 00:16:28 +01:00
|
|
|
@drive@@path@foobar
|
2011-08-30 23:33:52 +02:00
|
|
|
@pwd@
|
2014-03-11 00:16:28 +01:00
|
|
|
@drive@@path@foobar\baz
|
|
|
|
@drive@@path@foobar
|
|
|
|
@drive@@path@foobar
|
2011-08-30 23:33:52 +02:00
|
|
|
@pwd@
|
2014-03-11 00:16:28 +01:00
|
|
|
@drive@@path@foobar
|
2011-08-30 23:33:52 +02:00
|
|
|
@pwd@
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing attrib ------------
|
2014-03-11 00:16:28 +01:00
|
|
|
A @drive@@path@foobar\foo@or_broken@A @drive@@path@foobar\foo@or_broken@A I @drive@@path@foobar\foo
|
2011-11-29 11:46:16 +01:00
|
|
|
--- read-only attribute
|
2014-03-11 00:16:28 +01:00
|
|
|
A R @drive@@path@foobar\foo@or_broken@A R @drive@@path@foobar\foo@or_broken@A R I @drive@@path@foobar\foo
|
2011-08-24 12:53:21 +02:00
|
|
|
foo
|
|
|
|
foo original contents
|
|
|
|
Read-only file not deleted
|
|
|
|
Read-only file forcibly deleted
|
2011-11-29 11:46:16 +01:00
|
|
|
--- recursive behaviour
|
2014-03-11 00:16:28 +01:00
|
|
|
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
|
2011-11-29 11:46:16 +01:00
|
|
|
--- folders processing
|
2014-03-11 00:16:28 +01:00
|
|
|
@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
|
2011-08-24 12:53:21 +02:00
|
|
|
toto
|
|
|
|
lulu
|
|
|
|
file created in read-only dir
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing assoc ------------
|
2011-11-29 11:46:16 +01:00
|
|
|
--- setting association
|
|
|
|
---
|
2011-08-29 21:45:16 +02:00
|
|
|
.foo=bar
|
2011-08-29 21:45:17 +02:00
|
|
|
.foo=bar
|
2011-08-29 21:45:16 +02:00
|
|
|
+++
|
2011-08-29 21:45:17 +02:00
|
|
|
.foo=bar
|
2011-11-29 11:46:16 +01:00
|
|
|
--- resetting association
|
|
|
|
---
|
2011-08-29 21:45:16 +02:00
|
|
|
+++
|
2011-11-29 11:46:16 +01:00
|
|
|
---
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing ftype ------------
|
2011-11-29 11:46:16 +01:00
|
|
|
--- setting association
|
|
|
|
---
|
2011-08-29 21:45:19 +02:00
|
|
|
footype=foo_opencmd
|
|
|
|
.foo=footype
|
|
|
|
footype=foo_opencmd
|
|
|
|
+++
|
|
|
|
footype=foo_opencmd
|
2011-11-29 11:46:16 +01:00
|
|
|
--- resetting association
|
2012-11-08 23:06:21 +01:00
|
|
|
@todo_wine@original value@or_broken@buggyXP@or_broken@!WINE_FOO!
|
2011-09-11 16:54:08 +02:00
|
|
|
------------ Testing CALL ------------
|
2011-11-29 11:46:16 +01:00
|
|
|
--- external script
|
2011-07-28 01:06:45 +02:00
|
|
|
foo@space@
|
2011-08-27 02:11:30 +02:00
|
|
|
foo 8
|
2011-07-29 13:59:51 +02:00
|
|
|
foo@space@@space@
|
|
|
|
foo bar@space@
|
2012-09-26 01:07:20 +02:00
|
|
|
foo ""@space@
|
|
|
|
"" bar@space@
|
2011-07-29 13:59:51 +02:00
|
|
|
foo ''@space@
|
|
|
|
'' bar@space@
|
2011-11-29 11:46:16 +01:00
|
|
|
--- internal routines
|
2011-07-21 15:28:26 +02:00
|
|
|
bar :testRoutine
|
2011-07-29 13:59:51 +02:00
|
|
|
foo@space@
|
|
|
|
foo bar
|
2012-09-26 01:07:20 +02:00
|
|
|
foo ""
|
|
|
|
"" bar
|
2011-07-29 13:59:51 +02:00
|
|
|
foo ''
|
|
|
|
'' bar
|
2011-11-29 11:46:16 +01:00
|
|
|
--- with builtins
|
2012-10-14 01:38:53 +02:00
|
|
|
0
|
|
|
|
foo created
|
|
|
|
Should expand foobaz
|
|
|
|
batfile
|
|
|
|
robinfile
|
|
|
|
1
|
|
|
|
1
|
2011-07-21 15:28:26 +02:00
|
|
|
non-builtin dir
|
2012-10-14 01:38:53 +02:00
|
|
|
Line one
|
|
|
|
Line two
|
|
|
|
Get if
|
|
|
|
... and else!
|
|
|
|
passed
|
2011-09-13 12:06:45 +02:00
|
|
|
------------ Testing SHIFT ------------
|
|
|
|
'p1' 'p2' 'p3' 'p4' 'p5'
|
|
|
|
'p2' 'p3' 'p4' 'p5' ''
|
|
|
|
'p3' 'p4' 'p5' '' ''
|
|
|
|
'p3' 'p5' '' '' ''
|
|
|
|
'p3' 'p5' '' '' ''
|
|
|
|
'p5' '' '' '' ''
|
2011-09-11 17:14:54 +02:00
|
|
|
------------ Testing cmd invocation ------------
|
2011-11-29 11:46:16 +01:00
|
|
|
--- a batch file can delete itself
|
2011-09-11 17:14:55 +02:00
|
|
|
file correctly deleted
|
2011-11-29 11:46:16 +01:00
|
|
|
--- a batch file can alter itself
|
2011-09-11 17:14:54 +02:00
|
|
|
@todo_wine@bar
|
2012-10-12 00:40:21 +02:00
|
|
|
---------- 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
|
2012-10-12 01:37:24 +02:00
|
|
|
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
|
2012-10-12 11:23:24 +02:00
|
|
|
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
|
2012-10-12 01:37:24 +02:00
|
|
|
Passed: file size check on file1_binary_srccopy [6]@or_broken@Skipping file size check on NT4
|
2012-10-12 11:23:24 +02:00
|
|
|
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
|
2012-10-12 00:40:21 +02:00
|
|
|
Passed: errorlevel invalid check 1
|
|
|
|
Passed: Did not find dir1\file1
|
|
|
|
Passed: errorlevel invalid check 2
|
|
|
|
Passed: errorlevel invalid check 3
|
2011-08-04 11:50:47 +02:00
|
|
|
------------ Testing setlocal/endlocal ------------
|
2011-11-29 11:46:16 +01:00
|
|
|
--- enable/disable extensions
|
2011-08-04 11:50:47 +02:00
|
|
|
@todo_wine@ErrLev:@space@
|
|
|
|
ErrLev: 0
|
|
|
|
ErrLev: 0
|
|
|
|
@todo_wine@ErrLev:@space@@or_broken@ErrLev: 0
|
|
|
|
ErrLev: 0
|
2011-11-29 11:46:16 +01:00
|
|
|
--- setlocal with corresponding endlocal
|
2011-08-04 11:50:47 +02:00
|
|
|
globalval
|
|
|
|
localval
|
2014-03-11 00:16:28 +01:00
|
|
|
@drive@@path@foobar\foobar2
|
2011-08-04 11:50:47 +02:00
|
|
|
globalval
|
2014-03-11 00:16:28 +01:00
|
|
|
@drive@@path@foobar
|
2011-08-04 11:50:47 +02:00
|
|
|
globalval
|
2014-03-11 00:16:28 +01:00
|
|
|
@drive@@path@foobar
|
2011-11-29 11:46:16 +01:00
|
|
|
--- setlocal with no corresponding endlocal
|
2011-08-04 11:50:47 +02:00
|
|
|
globalval
|
|
|
|
localval
|
2014-03-11 00:16:28 +01:00
|
|
|
@drive@@path@foobar\foobar2
|
2012-10-01 00:07:01 +02:00
|
|
|
globalval
|
2014-03-11 00:16:28 +01:00
|
|
|
@drive@@path@foobar
|
2012-10-01 00:07:01 +02:00
|
|
|
--- 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
|
2014-03-11 00:16:28 +01:00
|
|
|
@drive@@path@foobar\foodir3
|
2012-10-01 00:07:01 +02:00
|
|
|
Finished:
|
|
|
|
value2
|
2014-03-11 00:16:28 +01:00
|
|
|
@drive@@path@foobar\foodir2
|
2012-10-01 00:07:01 +02:00
|
|
|
value1
|
2014-03-11 00:16:28 +01:00
|
|
|
@drive@@path@foobar
|
2012-10-01 00:07:01 +02:00
|
|
|
--- Extra endlocal in called batch
|
|
|
|
value2
|
|
|
|
value2
|
2014-03-11 00:16:28 +01:00
|
|
|
@drive@@path@foobar\foodir2
|
2012-10-01 00:07:01 +02:00
|
|
|
value2
|
2014-03-11 00:16:28 +01:00
|
|
|
@drive@@path@foobar\foodir2
|
2012-10-01 00:07:01 +02:00
|
|
|
Finished:
|
|
|
|
value2
|
2014-03-11 00:16:28 +01:00
|
|
|
@drive@@path@foobar\foodir2
|
2012-10-01 00:07:01 +02:00
|
|
|
value1
|
2014-03-11 00:16:28 +01:00
|
|
|
@drive@@path@foobar
|
2012-10-01 00:07:01 +02:00
|
|
|
--- endlocal in called function rather than batch pgm is ineffective
|
|
|
|
2
|
|
|
|
2
|
|
|
|
1
|
|
|
|
2
|
|
|
|
1
|
|
|
|
2
|
|
|
|
1
|
|
|
|
1
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing Errorlevel ------------
|
2011-07-19 09:49:26 +02:00
|
|
|
9009
|
2011-05-26 06:42:37 +02:00
|
|
|
1
|
|
|
|
errorlevel just right, good
|
2011-10-26 16:57:52 +02:00
|
|
|
errorlevel with leading zero just right, good
|
|
|
|
errorlevel with negative number OK
|
2011-05-26 06:42:37 +02:00
|
|
|
abc0def@or_broken@abc1def
|
|
|
|
errorlevel zero, good@or_broken@errorlevel nonzero, bad
|
|
|
|
7 should be 7
|
|
|
|
7 should still be 7
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing GOTO ------------
|
2010-03-24 04:45:49 +01:00
|
|
|
goto with no leading space worked
|
2013-06-02 01:17:30 +02:00
|
|
|
goto with colon and no leading space worked
|
2010-03-24 04:45:49 +01:00
|
|
|
goto with a leading space worked
|
|
|
|
goto with a leading tab worked
|
2010-12-13 00:04:19 +01:00
|
|
|
goto with a following space worked
|
2013-06-02 01:17:30 +02:00
|
|
|
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
|
2012-09-04 01:30:17 +02:00
|
|
|
------------ Testing PATH ------------
|
|
|
|
PATH=original
|
|
|
|
PATH=try2
|
|
|
|
PATH=try3
|
2011-11-29 11:45:51 +01:00
|
|
|
------------ Testing combined CALLs/GOTOs ------------
|
2011-09-11 17:14:56 +02:00
|
|
|
world
|
|
|
|
cheball
|
|
|
|
barbare
|
|
|
|
bar
|
|
|
|
foo
|
|
|
|
baz
|
|
|
|
cheball
|
|
|
|
barbare
|