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
584eb4e8
Commit
584eb4e8
authored
Aug 24, 2022
by
Brendan Shanks
Committed by
Alexandre Julliard
Aug 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32/tests: Test ExtractIcon() with an empty/invalid path.
parent
a9ed1133
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
shelllink.c
dlls/shell32/tests/shelllink.c
+17
-0
No files found.
dlls/shell32/tests/shelllink.c
View file @
584eb4e8
...
...
@@ -1174,6 +1174,7 @@ static void test_ExtractIcon(void)
{
static
const
WCHAR
nameW
[]
=
{
'\\'
,
'e'
,
'x'
,
't'
,
'r'
,
'a'
,
'c'
,
't'
,
'i'
,
'c'
,
'o'
,
'n'
,
'_'
,
't'
,
'e'
,
's'
,
't'
,
'.'
,
't'
,
'x'
,
't'
,
0
};
static
const
WCHAR
shell32W
[]
=
{
's'
,
'h'
,
'e'
,
'l'
,
'l'
,
'3'
,
'2'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
static
const
WCHAR
emptyW
[]
=
{
0
};
WCHAR
pathW
[
MAX_PATH
];
HICON
hicon
,
hicon2
;
char
path
[
MAX_PATH
];
...
...
@@ -1223,6 +1224,14 @@ static void test_ExtractIcon(void)
r
=
DeleteFileA
(
path
);
ok
(
r
,
"failed to delete file %s (%ld)
\n
"
,
path
,
GetLastError
());
/* Empty file path */
hicon
=
ExtractIconA
(
NULL
,
""
,
-
1
);
ok
(
hicon
==
NULL
,
"Got icon %p
\n
"
,
hicon
);
hicon
=
ExtractIconA
(
NULL
,
""
,
0
);
todo_wine
ok
(
hicon
==
NULL
,
"Got icon %p
\n
"
,
hicon
);
/* same for W variant */
if
(
0
)
{
...
...
@@ -1270,6 +1279,14 @@ if (0)
r
=
DeleteFileW
(
pathW
);
ok
(
r
,
"failed to delete file %s (%ld)
\n
"
,
path
,
GetLastError
());
/* Empty file path */
hicon
=
ExtractIconW
(
NULL
,
emptyW
,
-
1
);
ok
(
hicon
==
NULL
,
"Got icon %p
\n
"
,
hicon
);
hicon
=
ExtractIconW
(
NULL
,
emptyW
,
0
);
todo_wine
ok
(
hicon
==
NULL
,
"Got icon %p
\n
"
,
hicon
);
}
static
void
test_ExtractAssociatedIcon
(
void
)
...
...
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