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
6c62a107
Commit
6c62a107
authored
Mar 09, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
Mar 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi/tests: Fix failures on systems with IE5.5 or earlier.
parent
f9cf3ab1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
13 deletions
+39
-13
shreg.c
dlls/shlwapi/tests/shreg.c
+39
-13
No files found.
dlls/shlwapi/tests/shreg.c
View file @
6c62a107
...
...
@@ -122,8 +122,12 @@ static void test_SHGetValue(void)
dwType
=
-
1
;
dwRet
=
SHGetValueA
(
HKEY_CURRENT_USER
,
REG_TEST_KEY
,
"Test1"
,
&
dwType
,
buf
,
&
dwSize
);
ok
(
ERROR_SUCCESS
==
dwRet
,
"SHGetValueA failed, ret=%u
\n
"
,
dwRet
);
ok
(
0
==
strcmp
(
sExpTestpath1
,
buf
),
"Comparing of (%s) with (%s) failed
\n
"
,
buf
,
sExpTestpath1
);
ok
(
REG_SZ
==
dwType
,
"Expected REG_SZ, got (%u)
\n
"
,
dwType
);
ok
(
0
==
strcmp
(
sExpTestpath1
,
buf
)
||
broken
(
0
==
strcmp
(
sTestpath1
,
buf
)),
/* IE4.x */
"Comparing of (%s) with (%s) failed
\n
"
,
buf
,
sExpTestpath1
);
ok
(
REG_SZ
==
dwType
||
broken
(
REG_EXPAND_SZ
==
dwType
),
/* IE4.x */
"Expected REG_SZ, got (%u)
\n
"
,
dwType
);
strcpy
(
buf
,
sEmptyBuffer
);
dwSize
=
MAX_PATH
;
...
...
@@ -196,7 +200,9 @@ static void test_SHQUeryValueEx(void)
dwSize
=
6
;
dwRet
=
SHQueryValueExA
(
hKey
,
"Test3"
,
NULL
,
NULL
,
NULL
,
&
dwSize
);
ok
(
ERROR_SUCCESS
==
dwRet
,
"%s failed, ret=%u
\n
"
,
sTestedFunction
,
dwRet
);
ok
(
dwSize
>=
nUsedBuffer2
,
"Buffer size (%u) should be >= (%u)
\n
"
,
dwSize
,
nUsedBuffer2
);
ok
(
dwSize
>=
nUsedBuffer2
||
broken
(
dwSize
==
(
strlen
(
sTestpath2
)
+
1
)),
/* < IE4.x */
"Buffer size (%u) should be >= (%u)
\n
"
,
dwSize
,
nUsedBuffer2
);
/*
* Case 1 string shrinks during expanding
...
...
@@ -208,7 +214,9 @@ static void test_SHQUeryValueEx(void)
ok
(
ERROR_MORE_DATA
==
dwRet
,
"Expected ERROR_MORE_DATA, got (%u)
\n
"
,
dwRet
);
ok
(
0
==
strcmp
(
sEmptyBuffer
,
buf
)
,
"Comparing (%s) with (%s) failed
\n
"
,
buf
,
sEmptyBuffer
);
ok
(
dwSize
==
nUsedBuffer1
,
"Buffer sizes (%u) and (%u) are not equal
\n
"
,
dwSize
,
nUsedBuffer1
);
ok
(
REG_SZ
==
dwType
,
"Expected REG_SZ, got (%u)
\n
"
,
dwType
);
ok
(
REG_SZ
==
dwType
||
broken
(
REG_EXPAND_SZ
==
dwType
),
/* < IE6 */
"Expected REG_SZ, got (%u)
\n
"
,
dwType
);
/*
* string grows during expanding
...
...
@@ -220,8 +228,12 @@ static void test_SHQUeryValueEx(void)
dwRet
=
SHQueryValueExA
(
hKey
,
"Test3"
,
NULL
,
&
dwType
,
buf
,
&
dwSize
);
ok
(
ERROR_MORE_DATA
==
dwRet
,
"Expected ERROR_MORE_DATA, got (%u)
\n
"
,
dwRet
);
ok
(
0
==
strcmp
(
sEmptyBuffer
,
buf
)
,
"Comparing (%s) with (%s) failed
\n
"
,
buf
,
sEmptyBuffer
);
ok
(
dwSize
>=
nUsedBuffer2
,
"Buffer size (%u) should be >= (%u)
\n
"
,
dwSize
,
nUsedBuffer2
);
ok
(
REG_SZ
==
dwType
,
"Expected REG_SZ, got (%u)
\n
"
,
dwType
);
ok
(
dwSize
>=
nUsedBuffer2
||
broken
(
dwSize
==
(
strlen
(
sTestpath2
)
+
1
)),
/* < IE6 */
"Buffer size (%u) should be >= (%u)
\n
"
,
dwSize
,
nUsedBuffer2
);
ok
(
REG_SZ
==
dwType
||
broken
(
REG_EXPAND_SZ
==
dwType
),
/* < IE6 */
"Expected REG_SZ, got (%u)
\n
"
,
dwType
);
/*
* string grows during expanding
...
...
@@ -233,7 +245,10 @@ static void test_SHQUeryValueEx(void)
dwSize
=
strlen
(
sEnvvar2
)
-
2
;
dwType
=
-
1
;
dwRet
=
SHQueryValueExA
(
hKey
,
"Test3"
,
NULL
,
&
dwType
,
buf
,
&
dwSize
);
ok
(
ERROR_MORE_DATA
==
dwRet
,
"Expected ERROR_MORE_DATA, got (%u)
\n
"
,
dwRet
);
ok
(
ERROR_MORE_DATA
==
dwRet
||
broken
(
ERROR_ENVVAR_NOT_FOUND
==
dwRet
)
||
/* IE5.5 */
broken
(
ERROR_SUCCESS
==
dwRet
),
/* < IE5.5*/
"Expected ERROR_MORE_DATA, got (%u)
\n
"
,
dwRet
);
todo_wine
{
...
...
@@ -241,7 +256,9 @@ static void test_SHQUeryValueEx(void)
"Expected empty or unexpanded string (win98), got (%s)
\n
"
,
buf
);
}
ok
(
dwSize
>=
nUsedBuffer2
,
"Buffer size (%u) should be >= (%u)
\n
"
,
dwSize
,
nUsedBuffer2
);
ok
(
dwSize
>=
nUsedBuffer2
||
broken
(
dwSize
==
(
strlen
(
""
)
+
1
)),
/* < IE 5.5 */
"Buffer size (%u) should be >= (%u)
\n
"
,
dwSize
,
nUsedBuffer2
);
ok
(
REG_SZ
==
dwType
,
"Expected REG_SZ, got (%u)
\n
"
,
dwType
);
/*
...
...
@@ -254,15 +271,22 @@ static void test_SHQUeryValueEx(void)
dwSize
=
nExpLen2
-
4
;
dwType
=
-
1
;
dwRet
=
SHQueryValueExA
(
hKey
,
"Test3"
,
NULL
,
&
dwType
,
buf
,
&
dwSize
);
ok
(
ERROR_MORE_DATA
==
dwRet
,
"Expected ERROR_MORE_DATA, got (%u)
\n
"
,
dwRet
);
ok
(
ERROR_MORE_DATA
==
dwRet
||
broken
(
ERROR_ENVVAR_NOT_FOUND
==
dwRet
)
||
/* IE5.5 */
broken
(
ERROR_SUCCESS
==
dwRet
),
/* < IE5.5 */
"Expected ERROR_MORE_DATA, got (%u)
\n
"
,
dwRet
);
todo_wine
{
ok
(
(
0
==
strcmp
(
""
,
buf
))
||
(
0
==
strcmp
(
sEnvvar2
,
buf
)),
"Expected empty or first part of the string
\"
%s
\"
, got
\"
%s
\"\n
"
,
sEnvvar2
,
buf
);
ok
(
(
0
==
strcmp
(
""
,
buf
))
||
(
0
==
strcmp
(
sEnvvar2
,
buf
))
||
broken
(
0
==
strcmp
(
sTestpath2
,
buf
)),
/* IE 5.5 */
"Expected empty or first part of the string
\"
%s
\"
, got
\"
%s
\"\n
"
,
sEnvvar2
,
buf
);
}
ok
(
dwSize
>=
nUsedBuffer2
,
"Buffer size (%u) should be >= (%u)
\n
"
,
dwSize
,
nUsedBuffer2
);
ok
(
dwSize
>=
nUsedBuffer2
||
broken
(
dwSize
==
(
strlen
(
sEnvvar2
)
+
1
))
||
/* IE4.01 SP1 (W98) and IE5 (W98SE) */
broken
(
dwSize
==
(
strlen
(
""
)
+
1
)),
/* IE4.01 (NT4) and IE5.x (W2K) */
"Buffer size (%u) should be >= (%u)
\n
"
,
dwSize
,
nUsedBuffer2
);
ok
(
REG_SZ
==
dwType
,
"Expected REG_SZ, got (%u)
\n
"
,
dwType
);
/*
...
...
@@ -273,7 +297,9 @@ static void test_SHQUeryValueEx(void)
dwType
=
-
1
;
dwRet
=
SHQueryValueExA
(
hKey
,
"Test3"
,
NULL
,
&
dwType
,
NULL
,
&
dwSize
);
ok
(
ERROR_SUCCESS
==
dwRet
,
"%s failed, ret=%u
\n
"
,
sTestedFunction
,
dwRet
);
ok
(
dwSize
>=
nUsedBuffer2
,
"Buffer size (%u) should be >= (%u)
\n
"
,
dwSize
,
nUsedBuffer2
);
ok
(
dwSize
>=
nUsedBuffer2
||
broken
(
dwSize
==
(
strlen
(
sTestpath2
)
+
1
)),
/* IE4.01 SP1 (Win98) */
"Buffer size (%u) should be >= (%u)
\n
"
,
dwSize
,
nUsedBuffer2
);
ok
(
REG_SZ
==
dwType
,
"Expected REG_SZ, got (%u)
\n
"
,
dwType
);
RegCloseKey
(
hKey
);
...
...
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