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
dba1a78a
Commit
dba1a78a
authored
Jan 10, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 10, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32/tests: Test valid special folder IDs with NameSpace() method.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
199af34f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
1 deletion
+60
-1
shelldispatch.c
dlls/shell32/tests/shelldispatch.c
+60
-1
No files found.
dlls/shell32/tests/shelldispatch.c
View file @
dba1a78a
...
@@ -58,6 +58,48 @@ static void init_function_pointers(void)
...
@@ -58,6 +58,48 @@ static void init_function_pointers(void)
static
void
test_namespace
(
void
)
static
void
test_namespace
(
void
)
{
{
static
const
ShellSpecialFolderConstants
special_folders
[]
=
{
ssfDESKTOP
,
ssfPROGRAMS
,
ssfCONTROLS
,
ssfPRINTERS
,
ssfPERSONAL
,
ssfFAVORITES
,
ssfSTARTUP
,
ssfRECENT
,
ssfSENDTO
,
ssfBITBUCKET
,
ssfSTARTMENU
,
ssfDESKTOPDIRECTORY
,
ssfDRIVES
,
ssfNETWORK
,
ssfNETHOOD
,
ssfFONTS
,
ssfTEMPLATES
,
ssfCOMMONSTARTMENU
,
ssfCOMMONPROGRAMS
,
ssfCOMMONSTARTUP
,
ssfCOMMONDESKTOPDIR
,
ssfAPPDATA
,
ssfPRINTHOOD
,
ssfLOCALAPPDATA
,
ssfALTSTARTUP
,
ssfCOMMONALTSTARTUP
,
ssfCOMMONFAVORITES
,
ssfINTERNETCACHE
,
ssfCOOKIES
,
ssfHISTORY
,
ssfCOMMONAPPDATA
,
ssfWINDOWS
,
ssfSYSTEM
,
ssfPROGRAMFILES
,
ssfMYPICTURES
,
ssfPROFILE
,
ssfSYSTEMx86
,
ssfPROGRAMFILESx86
,
};
static
const
WCHAR
backslashW
[]
=
{
'\\'
,
0
};
static
const
WCHAR
backslashW
[]
=
{
'\\'
,
0
};
static
const
WCHAR
clsidW
[]
=
{
static
const
WCHAR
clsidW
[]
=
{
':'
,
':'
,
'{'
,
'6'
,
'4'
,
'5'
,
'F'
,
'F'
,
'0'
,
'4'
,
'0'
,
'-'
,
'5'
,
'0'
,
'8'
,
'1'
,
'-'
,
':'
,
':'
,
'{'
,
'6'
,
'4'
,
'5'
,
'F'
,
'F'
,
'0'
,
'4'
,
'0'
,
'-'
,
'5'
,
'0'
,
'8'
,
'1'
,
'-'
,
...
@@ -73,7 +115,7 @@ static void test_namespace(void)
...
@@ -73,7 +115,7 @@ static void test_namespace(void)
FolderItem
*
item
;
FolderItem
*
item
;
VARIANT
var
;
VARIANT
var
;
BSTR
title
,
item_path
;
BSTR
title
,
item_path
;
int
len
;
int
len
,
i
;
r
=
CoCreateInstance
(
&
CLSID_Shell
,
NULL
,
CLSCTX_INPROC_SERVER
,
r
=
CoCreateInstance
(
&
CLSID_Shell
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IShellDispatch
,
(
LPVOID
*
)
&
sd
);
&
IID_IShellDispatch
,
(
LPVOID
*
)
&
sd
);
...
@@ -92,6 +134,21 @@ static void test_namespace(void)
...
@@ -92,6 +134,21 @@ static void test_namespace(void)
ok
(
r
==
S_FALSE
,
"expected S_FALSE, got %08x
\n
"
,
r
);
ok
(
r
==
S_FALSE
,
"expected S_FALSE, got %08x
\n
"
,
r
);
ok
(
folder
==
NULL
,
"expected NULL, got %p
\n
"
,
folder
);
ok
(
folder
==
NULL
,
"expected NULL, got %p
\n
"
,
folder
);
/* test valid folder ids */
for
(
i
=
0
;
i
<
sizeof
(
special_folders
)
/
sizeof
(
special_folders
[
0
]);
i
++
)
{
V_VT
(
&
var
)
=
VT_I4
;
V_I4
(
&
var
)
=
special_folders
[
i
];
folder
=
(
void
*
)
0xdeadbeef
;
r
=
IShellDispatch_NameSpace
(
sd
,
var
,
&
folder
);
if
(
special_folders
[
i
]
==
ssfALTSTARTUP
||
special_folders
[
i
]
==
ssfCOMMONALTSTARTUP
)
ok
(
r
==
S_OK
||
broken
(
r
==
S_FALSE
)
/* winxp */
,
"Failed to get folder for index %#x, got %08x
\n
"
,
special_folders
[
i
],
r
);
else
ok
(
r
==
S_OK
,
"Failed to get folder for index %#x, got %08x
\n
"
,
special_folders
[
i
],
r
);
if
(
folder
)
Folder_Release
(
folder
);
}
V_VT
(
&
var
)
=
VT_I4
;
V_VT
(
&
var
)
=
VT_I4
;
V_I4
(
&
var
)
=
-
1
;
V_I4
(
&
var
)
=
-
1
;
folder
=
(
void
*
)
0xdeadbeef
;
folder
=
(
void
*
)
0xdeadbeef
;
...
@@ -99,6 +156,8 @@ static void test_namespace(void)
...
@@ -99,6 +156,8 @@ static void test_namespace(void)
todo_wine
{
todo_wine
{
ok
(
r
==
S_FALSE
,
"expected S_FALSE, got %08x
\n
"
,
r
);
ok
(
r
==
S_FALSE
,
"expected S_FALSE, got %08x
\n
"
,
r
);
ok
(
folder
==
NULL
,
"got %p
\n
"
,
folder
);
ok
(
folder
==
NULL
,
"got %p
\n
"
,
folder
);
if
(
r
==
S_OK
)
Folder_Release
(
folder
);
}
}
V_VT
(
&
var
)
=
VT_I4
;
V_VT
(
&
var
)
=
VT_I4
;
V_I4
(
&
var
)
=
ssfPROGRAMFILES
;
V_I4
(
&
var
)
=
ssfPROGRAMFILES
;
...
...
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