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
5614ae23
Commit
5614ae23
authored
Mar 19, 2015
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Mar 19, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32/tests: Add a couple of SHFileOperation(FO_MOVE) tests for a directory.
parent
9811d851
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
shlfileop.c
dlls/shell32/tests/shlfileop.c
+46
-0
No files found.
dlls/shell32/tests/shlfileop.c
View file @
5614ae23
...
...
@@ -164,6 +164,9 @@ static void clean_after_shfo_tests(void)
DeleteFileA
(
"test4.txt
\\
test1.txt"
);
DeleteFileA
(
"test4.txt
\\
test2.txt"
);
DeleteFileA
(
"test4.txt
\\
test3.txt"
);
DeleteFileA
(
"test4.txt
\\
one.txt"
);
DeleteFileA
(
"test4.txt
\\
nested
\\
two.txt"
);
RemoveDirectoryA
(
"test4.txt
\\
nested"
);
RemoveDirectoryA
(
"test4.txt"
);
DeleteFileA
(
"testdir2
\\
one.txt"
);
DeleteFileA
(
"testdir2
\\
test1.txt"
);
...
...
@@ -1826,6 +1829,49 @@ static void test_move(void)
CHAR
to
[
5
*
MAX_PATH
];
DWORD
retval
;
clean_after_shfo_tests
();
init_shfo_tests
();
shfo
.
hwnd
=
NULL
;
shfo
.
wFunc
=
FO_MOVE
;
shfo
.
pFrom
=
from
;
shfo
.
pTo
=
to
;
shfo
.
fFlags
=
FOF_NOCONFIRMATION
|
FOF_SILENT
|
FOF_NOERRORUI
|
FOF_NOCONFIRMMKDIR
;
shfo
.
hNameMappings
=
NULL
;
shfo
.
lpszProgressTitle
=
NULL
;
shfo
.
fAnyOperationsAborted
=
FALSE
;
set_curr_dir_path
(
from
,
"testdir2
\\
*.*
\0
"
);
set_curr_dir_path
(
to
,
"test4.txt
\\
*.*
\0
"
);
retval
=
SHFileOperationA
(
&
shfo
);
ok
(
retval
!=
0
,
"SHFileOperation should fail
\n
"
);
ok
(
!
shfo
.
fAnyOperationsAborted
,
"fAnyOperationsAborted %d
\n
"
,
shfo
.
fAnyOperationsAborted
);
ok
(
file_exists
(
"testdir2"
),
"dir should not be moved
\n
"
);
ok
(
file_exists
(
"testdir2
\\
one.txt"
),
"file should not be moved
\n
"
);
ok
(
file_exists
(
"testdir2
\\
nested"
),
"dir should not be moved
\n
"
);
ok
(
file_exists
(
"testdir2
\\
nested
\\
two.txt"
),
"file should not be moved
\n
"
);
set_curr_dir_path
(
from
,
"testdir2
\\
*.*
\0
"
);
set_curr_dir_path
(
to
,
"test4.txt
\0
"
);
retval
=
SHFileOperationA
(
&
shfo
);
ok
(
!
retval
,
"SHFileOperation error %#x
\n
"
,
retval
);
ok
(
!
shfo
.
fAnyOperationsAborted
,
"fAnyOperationsAborted %d
\n
"
,
shfo
.
fAnyOperationsAborted
);
ok
(
file_exists
(
"testdir2"
),
"dir should not be moved
\n
"
);
ok
(
!
file_exists
(
"testdir2
\\
one.txt"
),
"file should be moved
\n
"
);
todo_wine
ok
(
!
file_exists
(
"testdir2
\\
nested"
),
"dir should be moved
\n
"
);
ok
(
!
file_exists
(
"testdir2
\\
nested
\\
two.txt"
),
"file should be moved
\n
"
);
ok
(
file_exists
(
"test4.txt"
),
"dir should exist
\n
"
);
ok
(
file_exists
(
"test4.txt
\\
one.txt"
),
"file should exist
\n
"
);
ok
(
file_exists
(
"test4.txt
\\
nested"
),
"dir should exist
\n
"
);
ok
(
file_exists
(
"test4.txt
\\
nested
\\
two.txt"
),
"file should exist
\n
"
);
clean_after_shfo_tests
();
init_shfo_tests
();
shfo
.
hwnd
=
NULL
;
shfo
.
wFunc
=
FO_MOVE
;
shfo
.
pFrom
=
from
;
...
...
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