Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
212949f1
Commit
212949f1
authored
Oct 11, 2011
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Oct 11, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/tests: Add MOVE tests.
parent
652d80d9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
0 deletions
+85
-0
test_builtins.cmd
programs/cmd/tests/test_builtins.cmd
+70
-0
test_builtins.cmd.exp
programs/cmd/tests/test_builtins.cmd.exp
+15
-0
No files found.
programs/cmd/tests/test_builtins.cmd
View file @
212949f1
...
...
@@ -909,6 +909,76 @@ if not exist baz\abc (
)
cd .. & rd /s/q foobar
echo ------------ Testing move ------------
mkdir foobar & cd foobar
echo ... file move ...
echo >foo
move foo bar > nul 2>&1
if not exist foo (
if exist bar (
echo file move succeeded
)
)
echo bar>bar
echo baz> baz
move /Y bar baz > nul 2>&1
if not exist bar (
if exist baz (
echo file move with overwrite succeeded
)
) else (
echo file overwrite impossible!
del bar
)
type baz
mkdir rep
move baz rep > nul 2>&1
if not exist baz (
if exist rep\baz (
echo file moved in subdirectory
)
)
call :setError 0
move rep\baz . > nul 2>&1
move /Y baz baz > nul 2>&1
if errorlevel 1 (
echo moving a file to itself should be a no-op!
) else (
echo moving a file to itself is a no-op
)
echo ErrorLevel: %ErrorLevel%
call :setError 0
del baz
echo ... directory move ...
mkdir foo\bar
mkdir baz
echo baz2>baz\baz2
move baz foo\bar > nul 2>&1
if not exist baz (
if exist foo\bar\baz\baz2 (
echo simple directory move succeeded
)
)
call :setError 0
mkdir baz
move baz baz > nul 2>&1
echo moving a directory to itself gives error; errlevel %ErrorLevel%
echo ...... dir in dir move ......
rd /s/q foo
mkdir foo bar
echo foo2>foo\foo2
echo bar2>bar\bar2
move foo bar > nul 2>&1
if not exist foo (
if exist bar (
dir /b /ad bar
dir /b /a-d bar
dir /b bar\foo
)
)
cd .. & rd /s/q foobar
echo ------------ Testing mkdir ------------
call :setError 0
echo ... md and mkdir are synonymous ...
...
...
programs/cmd/tests/test_builtins.cmd.exp
View file @
212949f1
...
...
@@ -604,6 +604,21 @@ bar
... rename in other directory ...
@todo_wine@rename impossible in other directory
@todo_wine@original file still present
------------ Testing move ------------
... file move ...
file move succeeded
@todo_wine@file move with overwrite succeeded@or_broken@file overwrite impossible!
@todo_wine@bar@or_broken@baz
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
... directory move ...
simple directory move succeeded
moving a directory to itself gives error; errlevel 1
...... dir in dir move ......
foo
bar2
foo2
------------ Testing mkdir ------------
... md and mkdir are synonymous ...
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment