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
3a72922e
Commit
3a72922e
authored
Mar 11, 2014
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 11, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi/tests: Fix test failures on Windows 8.
parent
a8a753b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
12 deletions
+38
-12
assoc.c
dlls/shlwapi/tests/assoc.c
+38
-12
No files found.
dlls/shlwapi/tests/assoc.c
View file @
3a72922e
...
@@ -39,6 +39,8 @@ static const WCHAR invalid[] = { 'i','n','v','a','l','i','d',0 };
...
@@ -39,6 +39,8 @@ static const WCHAR invalid[] = { 'i','n','v','a','l','i','d',0 };
static
void
test_getstring_bad
(
void
)
static
void
test_getstring_bad
(
void
)
{
{
static
const
WCHAR
openwith
[]
=
{
'O'
,
'p'
,
'e'
,
'n'
,
'W'
,
'i'
,
't'
,
'h'
,
'.'
,
'e'
,
'x'
,
'e'
,
0
};
WCHAR
buf
[
MAX_PATH
];
HRESULT
hr
;
HRESULT
hr
;
DWORD
len
;
DWORD
len
;
...
@@ -48,47 +50,71 @@ static void test_getstring_bad(void)
...
@@ -48,47 +50,71 @@ static void test_getstring_bad(void)
return
;
return
;
}
}
len
=
0xdeadbeef
;
hr
=
pAssocQueryStringW
(
0
,
ASSOCSTR_EXECUTABLE
,
NULL
,
open
,
NULL
,
&
len
);
hr
=
pAssocQueryStringW
(
0
,
ASSOCSTR_EXECUTABLE
,
NULL
,
open
,
NULL
,
&
len
);
expect_hr
(
E_INVALIDARG
,
hr
);
expect_hr
(
E_INVALIDARG
,
hr
);
ok
(
len
==
0xdeadbeef
,
"got %u
\n
"
,
len
);
len
=
0xdeadbeef
;
hr
=
pAssocQueryStringW
(
0
,
ASSOCSTR_EXECUTABLE
,
badBad
,
open
,
NULL
,
&
len
);
hr
=
pAssocQueryStringW
(
0
,
ASSOCSTR_EXECUTABLE
,
badBad
,
open
,
NULL
,
&
len
);
ok
(
hr
==
E_FAIL
||
ok
(
hr
==
E_FAIL
||
hr
==
HRESULT_FROM_WIN32
(
ERROR_NO_ASSOCIATION
),
/* Win9x/WinMe/NT4/W2K/Vista/W2K8 */
hr
==
HRESULT_FROM_WIN32
(
ERROR_NO_ASSOCIATION
),
/* Win9x/WinMe/NT4/W2K/Vista/W2K8 */
"Unexpected result : %08x
\n
"
,
hr
);
"Unexpected result : %08x
\n
"
,
hr
);
hr
=
pAssocQueryStringW
(
0
,
ASSOCSTR_EXECUTABLE
,
dotBad
,
open
,
NULL
,
&
len
);
ok
(
len
==
0xdeadbeef
,
"got %u
\n
"
,
len
);
len
=
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]);
hr
=
pAssocQueryStringW
(
0
,
ASSOCSTR_EXECUTABLE
,
dotBad
,
open
,
buf
,
&
len
);
ok
(
hr
==
E_FAIL
||
ok
(
hr
==
E_FAIL
||
hr
==
HRESULT_FROM_WIN32
(
ERROR_NO_ASSOCIATION
),
/* Win9x/WinMe/NT4/W2K/Vista/W2K8 */
hr
==
HRESULT_FROM_WIN32
(
ERROR_NO_ASSOCIATION
)
/* Win9x/WinMe/NT4/W2K/Vista/W2K8 */
||
hr
==
S_OK
/* Win8 */
,
"Unexpected result : %08x
\n
"
,
hr
);
"Unexpected result : %08x
\n
"
,
hr
);
hr
=
pAssocQueryStringW
(
0
,
ASSOCSTR_EXECUTABLE
,
dotHtml
,
invalid
,
NULL
,
if
(
hr
==
S_OK
)
&
len
);
{
ok
(
len
<
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]),
"got %u
\n
"
,
len
);
ok
(
!
lstrcmpiW
(
buf
+
len
-
sizeof
(
openwith
)
/
sizeof
(
openwith
[
0
]),
openwith
),
"wrong data
\n
"
);
}
len
=
0xdeadbeef
;
hr
=
pAssocQueryStringW
(
0
,
ASSOCSTR_EXECUTABLE
,
dotHtml
,
invalid
,
NULL
,
&
len
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
)
||
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
)
||
hr
==
HRESULT_FROM_WIN32
(
ERROR_NO_ASSOCIATION
),
/* Win9x/WinMe/NT4/W2K/Vista/W2K8 */
hr
==
HRESULT_FROM_WIN32
(
ERROR_NO_ASSOCIATION
),
/* Win9x/WinMe/NT4/W2K/Vista/W2K8 */
"Unexpected result : %08x
\n
"
,
hr
);
"Unexpected result : %08x
\n
"
,
hr
);
ok
(
len
==
0xdeadbeef
,
"got %u
\n
"
,
len
);
hr
=
pAssocQueryStringW
(
0
,
ASSOCSTR_EXECUTABLE
,
dotHtml
,
open
,
NULL
,
NULL
);
hr
=
pAssocQueryStringW
(
0
,
ASSOCSTR_EXECUTABLE
,
dotHtml
,
open
,
NULL
,
NULL
);
ok
(
hr
==
E_UNEXPECTED
||
ok
(
hr
==
E_UNEXPECTED
||
hr
==
E_INVALIDARG
,
/* Win9x/WinMe/NT4/W2K/Vista/W2K8 */
hr
==
E_INVALIDARG
,
/* Win9x/WinMe/NT4/W2K/Vista/W2K8 */
"Unexpected result : %08x
\n
"
,
hr
);
"Unexpected result : %08x
\n
"
,
hr
);
len
=
0xdeadbeef
;
hr
=
pAssocQueryStringW
(
0
,
ASSOCSTR_FRIENDLYAPPNAME
,
NULL
,
open
,
NULL
,
&
len
);
hr
=
pAssocQueryStringW
(
0
,
ASSOCSTR_FRIENDLYAPPNAME
,
NULL
,
open
,
NULL
,
&
len
);
expect_hr
(
E_INVALIDARG
,
hr
);
expect_hr
(
E_INVALIDARG
,
hr
);
hr
=
pAssocQueryStringW
(
0
,
ASSOCSTR_FRIENDLYAPPNAME
,
badBad
,
open
,
NULL
,
ok
(
len
==
0xdeadbeef
,
"got %u
\n
"
,
len
);
&
len
);
len
=
0xdeadbeef
;
hr
=
pAssocQueryStringW
(
0
,
ASSOCSTR_FRIENDLYAPPNAME
,
badBad
,
open
,
NULL
,
&
len
);
ok
(
hr
==
E_FAIL
||
ok
(
hr
==
E_FAIL
||
hr
==
HRESULT_FROM_WIN32
(
ERROR_NO_ASSOCIATION
),
/* Win9x/WinMe/NT4/W2K/Vista/W2K8 */
hr
==
HRESULT_FROM_WIN32
(
ERROR_NO_ASSOCIATION
),
/* Win9x/WinMe/NT4/W2K/Vista/W2K8 */
"Unexpected result : %08x
\n
"
,
hr
);
"Unexpected result : %08x
\n
"
,
hr
);
hr
=
pAssocQueryStringW
(
0
,
ASSOCSTR_FRIENDLYAPPNAME
,
dotBad
,
open
,
NULL
,
ok
(
len
==
0xdeadbeef
,
"got %u
\n
"
,
len
);
&
len
);
len
=
0xdeadbeef
;
hr
=
pAssocQueryStringW
(
0
,
ASSOCSTR_FRIENDLYAPPNAME
,
dotBad
,
open
,
NULL
,
&
len
);
ok
(
hr
==
E_FAIL
||
ok
(
hr
==
E_FAIL
||
hr
==
HRESULT_FROM_WIN32
(
ERROR_NO_ASSOCIATION
)
/* Win9x/WinMe/NT4/W2K/Vista/W2K8 */
||
hr
==
HRESULT_FROM_WIN32
(
ERROR_NO_ASSOCIATION
)
/* Win9x/WinMe/NT4/W2K/Vista/W2K8 */
||
hr
==
HRESULT_FROM_WIN32
(
ERROR_NOT_FOUND
),
/* Win8 */
hr
==
HRESULT_FROM_WIN32
(
ERROR_NOT_FOUND
),
/* Win8 */
"Unexpected result : %08x
\n
"
,
hr
);
"Unexpected result : %08x
\n
"
,
hr
);
hr
=
pAssocQueryStringW
(
0
,
ASSOCSTR_FRIENDLYAPPNAME
,
dotHtml
,
invalid
,
NULL
,
ok
(
len
==
0xdeadbeef
,
"got %u
\n
"
,
len
);
&
len
);
len
=
0xdeadbeef
;
hr
=
pAssocQueryStringW
(
0
,
ASSOCSTR_FRIENDLYAPPNAME
,
dotHtml
,
invalid
,
NULL
,
&
len
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
)
||
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
)
||
hr
==
HRESULT_FROM_WIN32
(
ERROR_NO_ASSOCIATION
)
||
/* W2K/Vista/W2K8 */
hr
==
HRESULT_FROM_WIN32
(
ERROR_NO_ASSOCIATION
)
||
/* W2K/Vista/W2K8 */
hr
==
E_FAIL
,
/* Win9x/WinMe/NT4 */
hr
==
E_FAIL
,
/* Win9x/WinMe/NT4 */
"Unexpected result : %08x
\n
"
,
hr
);
"Unexpected result : %08x
\n
"
,
hr
);
hr
=
pAssocQueryStringW
(
0
,
ASSOCSTR_FRIENDLYAPPNAME
,
dotHtml
,
open
,
NULL
,
ok
(
len
==
0xdeadbeef
,
"got %u
\n
"
,
len
);
NULL
);
hr
=
pAssocQueryStringW
(
0
,
ASSOCSTR_FRIENDLYAPPNAME
,
dotHtml
,
open
,
NULL
,
NULL
);
ok
(
hr
==
E_UNEXPECTED
||
ok
(
hr
==
E_UNEXPECTED
||
hr
==
E_INVALIDARG
,
/* Win9x/WinMe/NT4/W2K/Vista/W2K8 */
hr
==
E_INVALIDARG
,
/* Win9x/WinMe/NT4/W2K/Vista/W2K8 */
"Unexpected result : %08x
\n
"
,
hr
);
"Unexpected result : %08x
\n
"
,
hr
);
...
...
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