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
063fd7a6
Commit
063fd7a6
authored
Dec 30, 2017
by
André Hentschel
Committed by
Alexandre Julliard
Jan 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32/tests: Don't test functions directly when reporting GetLastError().
Signed-off-by:
André Hentschel
<
nerv@dawncrow.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5200f347
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
shelldispatch.c
dlls/shell32/tests/shelldispatch.c
+11
-5
No files found.
dlls/shell32/tests/shelldispatch.c
View file @
063fd7a6
...
...
@@ -387,6 +387,7 @@ static void test_items(void)
HANDLE
file
;
BSTR
bstr
;
char
cstr
[
64
];
BOOL
ret
;
int
i
;
r
=
CoCreateInstance
(
&
CLSID_Shell
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IShellDispatch
,
(
void
**
)
&
sd
);
...
...
@@ -397,7 +398,8 @@ static void test_items(void)
GetTempPathW
(
MAX_PATH
,
path
);
GetCurrentDirectoryW
(
MAX_PATH
,
orig_dir
);
SetCurrentDirectoryW
(
path
);
ok
(
CreateDirectoryW
(
winetestW
,
NULL
),
"CreateDirectory failed: %08x
\n
"
,
GetLastError
());
ret
=
CreateDirectoryW
(
winetestW
,
NULL
);
ok
(
ret
,
"CreateDirectory failed: %08x
\n
"
,
GetLastError
());
GetFullPathNameW
(
winetestW
,
MAX_PATH
,
path
,
NULL
);
V_VT
(
&
var
)
=
VT_BSTR
;
V_BSTR
(
&
var
)
=
SysAllocString
(
path
);
...
...
@@ -673,7 +675,8 @@ static void test_items(void)
VariantClear
(
&
str_index2
);
/* delete the file in the subdirectory */
ok
(
DeleteFileA
(
cstr
),
"file_defs[%d]: DeleteFile failed: %08x
\n
"
,
i
,
GetLastError
());
ret
=
DeleteFileA
(
cstr
);
ok
(
ret
,
"file_defs[%d]: DeleteFile failed: %08x
\n
"
,
i
,
GetLastError
());
/* test that getting an item object via a relative path fails */
strcpy
(
cstr
,
file_defs
[
i
].
name
);
...
...
@@ -690,11 +693,13 @@ static void test_items(void)
VariantClear
(
&
str_index2
);
/* remove the directory */
ok
(
RemoveDirectoryA
(
file_defs
[
i
].
name
),
"file_defs[%d]: RemoveDirectory failed: %08x
\n
"
,
i
,
GetLastError
());
ret
=
RemoveDirectoryA
(
file_defs
[
i
].
name
);
ok
(
ret
,
"file_defs[%d]: RemoveDirectory failed: %08x
\n
"
,
i
,
GetLastError
());
}
else
{
ok
(
DeleteFileA
(
file_defs
[
i
].
name
),
"file_defs[%d]: DeleteFile failed: %08x
\n
"
,
i
,
GetLastError
());
ret
=
DeleteFileA
(
file_defs
[
i
].
name
);
ok
(
ret
,
"file_defs[%d]: DeleteFile failed: %08x
\n
"
,
i
,
GetLastError
());
}
/* test that the folder item is still accessible by integer index */
...
...
@@ -789,7 +794,8 @@ todo_wine
/* remove the temporary directory and restore the original working directory */
GetTempPathW
(
MAX_PATH
,
path
);
SetCurrentDirectoryW
(
path
);
ok
(
RemoveDirectoryW
(
winetestW
),
"RemoveDirectory failed: %08x
\n
"
,
GetLastError
());
ret
=
RemoveDirectoryW
(
winetestW
);
ok
(
ret
,
"RemoveDirectory failed: %08x
\n
"
,
GetLastError
());
SetCurrentDirectoryW
(
orig_dir
);
/* test that everything stops working after the directory has been removed */
...
...
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