Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
012af0bd
Commit
012af0bd
authored
Oct 08, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
Oct 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32/tests: Fix some test failures on WinMe (FO_COPY).
parent
93aa9ebc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
16 deletions
+39
-16
shlfileop.c
dlls/shell32/tests/shlfileop.c
+39
-16
No files found.
dlls/shell32/tests/shlfileop.c
View file @
012af0bd
...
...
@@ -1042,10 +1042,13 @@ static void test_copy(void)
shfo
.
pTo
=
"testdir2
\\
a.txt
\0
testdir2
\\
b.txt
\0
testdir2
\\
c.txt
\0
"
;
shfo
.
fAnyOperationsAborted
=
FALSE
;
retval
=
SHFileOperation
(
&
shfo
);
ok
(
retval
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
retval
);
ok
(
retval
==
ERROR_SUCCESS
||
broken
(
retval
==
0x100a1
),
/* WinMe */
"Expected ERROR_SUCCESS, got %d
\n
"
,
retval
);
ok
(
DeleteFile
(
"testdir2
\\
a.txt"
),
"Expected testdir2
\\
a.txt to exist
\n
"
);
ok
(
DeleteFile
(
"testdir2
\\
b.txt"
),
"Expected testdir2
\\
b.txt to exist
\n
"
);
ok
(
RemoveDirectory
(
"testdir2
\\
c.txt"
),
"Expected testdir2
\\
c.txt to exist
\n
"
);
if
(
retval
==
ERROR_SUCCESS
)
ok
(
RemoveDirectory
(
"testdir2
\\
c.txt"
),
"Expected testdir2
\\
c.txt to exist
\n
"
);
/* try many dest files without FOF_MULTIDESTFILES flag */
shfo
.
pFrom
=
"test1.txt
\0
test2.txt
\0
test3.txt
\0
"
;
...
...
@@ -1073,7 +1076,9 @@ static void test_copy(void)
shfo
.
pTo
=
"testdir2
\0
"
;
shfo
.
fFlags
&=
~
FOF_MULTIDESTFILES
;
retval
=
SHFileOperation
(
&
shfo
);
ok
(
retval
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
retval
);
ok
(
retval
==
ERROR_SUCCESS
||
broken
(
retval
==
0x100a1
),
/* WinMe */
"Expected ERROR_SUCCESS, got %d
\n
"
,
retval
);
ok
(
file_exists
(
"testdir2
\\
test1.txt"
),
"Expected testdir2
\\
test1.txt to exist
\n
"
);
/* try a glob with FOF_FILESONLY */
...
...
@@ -1190,18 +1195,28 @@ static void test_copy(void)
shfo
.
fFlags
&=
~
FOF_MULTIDESTFILES
;
shfo
.
fAnyOperationsAborted
=
FALSE
;
retval
=
SHFileOperation
(
&
shfo
);
ok
(
retval
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
retval
);
ok
(
DeleteFile
(
"testdir2
\\
test1.txt"
),
"Expected testdir2
\\
test1.txt to exist
\n
"
);
ok
(
DeleteFile
(
"testdir2
\\
test4.txt
\\
a.txt"
),
"Expected a.txt to exist
\n
"
);
ok
(
RemoveDirectory
(
"testdir2
\\
test4.txt"
),
"Expected testdir2
\\
test4.txt to exist
\n
"
);
ok
(
retval
==
ERROR_SUCCESS
||
broken
(
retval
==
0x100a1
),
/* WinMe */
"Expected ERROR_SUCCESS, got %d
\n
"
,
retval
);
if
(
retval
==
ERROR_SUCCESS
)
{
ok
(
DeleteFile
(
"testdir2
\\
test1.txt"
),
"Expected testdir2
\\
test1.txt to exist
\n
"
);
ok
(
DeleteFile
(
"testdir2
\\
test4.txt
\\
a.txt"
),
"Expected a.txt to exist
\n
"
);
ok
(
RemoveDirectory
(
"testdir2
\\
test4.txt"
),
"Expected testdir2
\\
test4.txt to exist
\n
"
);
}
/* copy one directory and a file in that dir to another dir */
shfo
.
pFrom
=
"test4.txt
\0
test4.txt
\\
a.txt
\0
"
;
shfo
.
pTo
=
"testdir2
\0
"
;
retval
=
SHFileOperation
(
&
shfo
);
ok
(
retval
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
retval
);
ok
(
DeleteFile
(
"testdir2
\\
test4.txt
\\
a.txt"
),
"Expected a.txt to exist
\n
"
);
ok
(
DeleteFile
(
"testdir2
\\
a.txt"
),
"Expected testdir2
\\
a.txt to exist
\n
"
);
ok
(
retval
==
ERROR_SUCCESS
||
broken
(
retval
==
0x100a1
),
/* WinMe */
"Expected ERROR_SUCCESS, got %d
\n
"
,
retval
);
if
(
retval
==
ERROR_SUCCESS
)
{
ok
(
DeleteFile
(
"testdir2
\\
test4.txt
\\
a.txt"
),
"Expected a.txt to exist
\n
"
);
ok
(
DeleteFile
(
"testdir2
\\
a.txt"
),
"Expected testdir2
\\
a.txt to exist
\n
"
);
}
/* copy a file in a directory first, and then the directory to a nonexistent dir */
shfo
.
pFrom
=
"test4.txt
\\
a.txt
\0
test4.txt
\0
"
;
...
...
@@ -1362,13 +1377,21 @@ static void test_copy(void)
createTestFile
(
"test4.txt
\\
test1.txt"
);
shfo
.
pFrom
=
"test4.txt
\0
"
;
shfo
.
pTo
=
"testdir2
\0
"
;
shfo
.
fFlags
=
FOF_NOCONFIRMATION
;
ok
(
!
SHFileOperation
(
&
shfo
),
"First SHFileOperation failed
\n
"
);
createTestFile
(
"test4.txt
\\
.
\\
test1.txt"
);
/* modify the content of the file */
/* without FOF_NOCONFIRMATION the confirmation is "This folder already contains a folder named ..." */
/* WinMe needs FOF_NOERRORUI */
shfo
.
fFlags
=
FOF_NOCONFIRMATION
|
FOF_NOERRORUI
;
retval
=
SHFileOperation
(
&
shfo
);
ok
(
retval
==
0
,
"Expected 0, got %d
\n
"
,
retval
);
ok
(
file_has_content
(
"testdir2
\\
test4.txt
\\
test1.txt"
,
"test4.txt
\\
.
\\
test1.txt
\n
"
),
"The file was not copied
\n
"
);
ok
(
retval
==
ERROR_SUCCESS
||
broken
(
retval
==
0x100a1
),
/* WinMe */
"Expected ERROR_SUCCESS, got %d
\n
"
,
retval
);
shfo
.
fFlags
=
FOF_NOCONFIRMATION
;
if
(
ERROR_SUCCESS
)
{
createTestFile
(
"test4.txt
\\
.
\\
test1.txt"
);
/* modify the content of the file */
/* without FOF_NOCONFIRMATION the confirmation is "This folder already contains a folder named ..." */
retval
=
SHFileOperation
(
&
shfo
);
ok
(
retval
==
0
,
"Expected 0, got %d
\n
"
,
retval
);
ok
(
file_has_content
(
"testdir2
\\
test4.txt
\\
test1.txt"
,
"test4.txt
\\
.
\\
test1.txt
\n
"
),
"The file was not copied
\n
"
);
}
createTestFile
(
"one.txt"
);
...
...
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