Sweden-Number/programs/cmd/tests/test_builtins.cmd.exp

140 lines
2.3 KiB
Plaintext
Raw Normal View History

2010-02-09 19:11:15 +01:00
@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@
"/?"
@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@
------------ Testing 'echo' [OFF] --------------
2010-02-09 19:11:15 +01:00
word
'singlequotedword'
"doublequotedword"
at-echoed-word
"/?"
.
word
.word
word@space@
word@space@@space@
------------ Testing 'set' --------------
set "FOO=bar" should not include the quotes in the variable value
bar
------------ Testing variable expansion --------------
~dp0 should be directory containing batch file
@pwd@\
@pwd@\
CD value @pwd@@or_broken@CD value
2010-03-09 13:15:35 +01:00
%
P
P
S
P
PS
ERRORLEVEL
0
00
0ERRORLEVEL
2010-03-09 13:15:35 +01:00
0
0%
P0
0S
P0S
2010-02-18 08:11:04 +01:00
------------ Testing if/else --------------
if/else should work with blocks
if seems to work
else seems to work
Testing case sensitivity with and without /i option
if seems to default to case sensitivity
if /i seems to work
if /I seems to work
2011-07-11 23:34:05 +02:00
-----------Testing for -----------
A
B
C
A
B
C
@todo_wine@X Y
@todo_wine@A C
@todo_wine@A D
@todo_wine@B C
@todo_wine@B D
@todo_wine@A C
@todo_wine@A D
@todo_wine@B C
@todo_wine@B D
-----------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 --------------
2011-07-11 23:34:06 +02:00
----------- Testing mkdir -----------
0
0
@todo_wine@1
@todo_wine@1
0
0
0
0
0
@todo_wine@1
0
0
0
dir created
0
@todo_wine@1
@todo_wine@1
@todo_wine@1
@todo_wine@ok, foo created
@todo_wine@1
@todo_wine@ok, foo\bar created
2011-05-26 06:42:37 +02:00
-----------Testing Errorlevel-----------
1
errorlevel just right, good
abc0def@or_broken@abc1def
errorlevel zero, good@or_broken@errorlevel nonzero, bad
7 should be 7
7 should still be 7
2010-03-24 04:45:49 +01:00
-----------Testing GOTO-----------
goto with no leading space worked
goto with a leading space worked
goto with a leading tab worked
goto with a following space worked
2011-05-26 06:42:37 +02:00
-----------Done, jumping to EOF-----------