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
d57f05f0
Commit
d57f05f0
authored
Mar 22, 2010
by
Paul Vriens
Committed by
Alexandre Julliard
Mar 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32/tests: Fix test failures on Win95, Win98 and NT4.
parent
01ebc665
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
19 deletions
+33
-19
shelllink.c
dlls/shell32/tests/shelllink.c
+33
-19
No files found.
dlls/shell32/tests/shelllink.c
View file @
d57f05f0
...
...
@@ -421,8 +421,6 @@ void create_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int save_fails)
lok
(
SUCCEEDED
(
r
),
"no IID_IPersistFile (0x%08x)
\n
"
,
r
);
if
(
SUCCEEDED
(
r
))
{
CHAR
buff
[
MAX_PATH
],
buff2
[
MAX_PATH
];
IMalloc
*
pmalloc
;
LPOLESTR
str
;
if
(
0
)
...
...
@@ -434,8 +432,10 @@ void create_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int save_fails)
/* test GetCurFile before ::Save */
str
=
(
LPWSTR
)
0xdeadbeef
;
r
=
IPersistFile_GetCurFile
(
pf
,
&
str
);
lok
(
r
==
S_FALSE
,
"got 0x%08x
\n
"
,
r
);
ok
(
str
==
NULL
,
"got %p
\n
"
,
str
);
lok
(
r
==
S_FALSE
||
broken
(
r
==
S_OK
),
/* shell32 < 5.0 */
"got 0x%08x
\n
"
,
r
);
lok
(
str
==
NULL
,
"got %p
\n
"
,
str
);
r
=
IPersistFile_Save
(
pf
,
path
,
TRUE
);
if
(
save_fails
)
...
...
@@ -452,14 +452,22 @@ void create_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int save_fails)
/* test GetCurFile after ::Save */
r
=
IPersistFile_GetCurFile
(
pf
,
&
str
);
lok
(
r
==
S_OK
,
"got 0x%08x
\n
"
,
r
);
lok
(
str
!=
NULL
||
broken
(
str
==
NULL
),
/* shell32 < 5.0 */
"Didn't expect NULL
\n
"
);
if
(
str
!=
NULL
)
{
IMalloc
*
pmalloc
;
WideCharToMultiByte
(
CP_ACP
,
0
,
str
,
-
1
,
buff
,
sizeof
(
buff
),
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
path
,
-
1
,
buff2
,
sizeof
(
buff2
),
NULL
,
NULL
);
lok
(
!
winetest_strcmpW
(
path
,
str
),
"Expected %s, got %s
\n
"
,
wine_dbgstr_w
(
path
),
wine_dbgstr_w
(
str
)
);
lok
(
!
strcmp
(
buff
,
buff2
),
"Expected %s, got %s
\n
"
,
buff2
,
buff
);
SHGetMalloc
(
&
pmalloc
);
IMalloc_Free
(
pmalloc
,
str
);
}
else
win_skip
(
"GetCurFile fails on shell32 < 5.0
\n
"
);
SHGetMalloc
(
&
pmalloc
);
IMalloc_Free
(
pmalloc
,
str
);
IPersistFile_Release
(
pf
);
}
...
...
@@ -472,8 +480,6 @@ static void check_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int todo)
IShellLinkA
*
sl
;
IPersistFile
*
pf
;
char
buffer
[
INFOTIPSIZE
];
CHAR
buff
[
MAX_PATH
],
buff2
[
MAX_PATH
];
IMalloc
*
pmalloc
;
LPOLESTR
str
;
r
=
CoCreateInstance
(
&
CLSID_ShellLink
,
NULL
,
CLSCTX_INPROC_SERVER
,
...
...
@@ -490,12 +496,12 @@ static void check_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int todo)
return
;
}
SHGetMalloc
(
&
pmalloc
);
/* test GetCurFile before ::Load */
str
=
(
LPWSTR
)
0xdeadbeef
;
r
=
IPersistFile_GetCurFile
(
pf
,
&
str
);
lok
(
r
==
S_FALSE
,
"got 0x%08x
\n
"
,
r
);
lok
(
r
==
S_FALSE
||
broken
(
r
==
S_OK
),
/* shell32 < 5.0 */
"got 0x%08x
\n
"
,
r
);
lok
(
str
==
NULL
,
"got %p
\n
"
,
str
);
r
=
IPersistFile_Load
(
pf
,
path
,
STGM_READ
);
...
...
@@ -504,13 +510,21 @@ static void check_lnk_(int line, const WCHAR* path, lnk_desc_t* desc, int todo)
/* test GetCurFile after ::Save */
r
=
IPersistFile_GetCurFile
(
pf
,
&
str
);
lok
(
r
==
S_OK
,
"got 0x%08x
\n
"
,
r
);
lok
(
str
!=
NULL
||
broken
(
str
==
NULL
),
/* shell32 < 5.0 */
"Didn't expect NULL
\n
"
);
if
(
str
!=
NULL
)
{
IMalloc
*
pmalloc
;
WideCharToMultiByte
(
CP_ACP
,
0
,
str
,
-
1
,
buff
,
sizeof
(
buff
),
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
path
,
-
1
,
buff2
,
sizeof
(
buff2
),
NULL
,
NULL
);
lok
(
!
strcmp
(
buff
,
buff2
),
"Expected %s, got %s
\n
"
,
buff2
,
buff
);
lok
(
!
winetest_strcmpW
(
path
,
str
),
"Expected %s, got %s
\n
"
,
wine_dbgstr_w
(
path
),
wine_dbgstr_w
(
str
));
IMalloc_Free
(
pmalloc
,
str
);
SHGetMalloc
(
&
pmalloc
);
IMalloc_Free
(
pmalloc
,
str
);
}
else
win_skip
(
"GetCurFile fails on shell32 < 5.0
\n
"
);
IPersistFile_Release
(
pf
);
if
(
FAILED
(
r
))
...
...
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