cmd: Show that windows doesn't lock/prevent access to batch file during execution.
This commit is contained in:
parent
d9659a6502
commit
cb63445b5e
|
@ -1256,6 +1256,27 @@ echo echo non-builtin dir> dir.cmd
|
|||
call dir /b
|
||||
cd .. & rd /s/q foobar
|
||||
|
||||
echo ------------ Testing cmd invocation ------------
|
||||
rem FIXME: only a stub ATM
|
||||
echo ... a batch file can delete itself ...
|
||||
echo del foo.cmd>foo.cmd
|
||||
cmd /q /c foo.cmd
|
||||
if not exist foo.cmd (
|
||||
echo file correctly deleted
|
||||
) else (
|
||||
echo file should be deleted!
|
||||
del foo.cmd
|
||||
)
|
||||
echo ... a batch file can alter itself ...
|
||||
echo echo bar^>foo.cmd>foo.cmd
|
||||
cmd /q /c foo.cmd > NUL 2>&1
|
||||
if exist foo.cmd (
|
||||
type foo.cmd
|
||||
del foo.cmd
|
||||
) else (
|
||||
echo file not created!
|
||||
)
|
||||
|
||||
echo ------------ Testing setlocal/endlocal ------------
|
||||
call :setError 0
|
||||
rem Note: setlocal EnableDelayedExtension already tested in the variable delayed expansion test section
|
||||
|
|
|
@ -723,6 +723,11 @@ foo ''
|
|||
@todo_wine@1
|
||||
@todo_wine@1
|
||||
non-builtin dir
|
||||
------------ Testing cmd invocation ------------
|
||||
... a batch file can delete itself ...
|
||||
@todo_wine@file correctly deleted
|
||||
... a batch file can alter itself ...
|
||||
@todo_wine@bar
|
||||
------------ Testing setlocal/endlocal ------------
|
||||
...enable/disable extensions
|
||||
@todo_wine@ErrLev:@space@
|
||||
|
|
Loading…
Reference in New Issue