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
f901f63b
Commit
f901f63b
authored
Oct 08, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi/tests: Fix the SetupGetIntField test to load the correct key.
parent
42c52151
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
15 deletions
+10
-15
parser.c
dlls/setupapi/tests/parser.c
+10
-15
No files found.
dlls/setupapi/tests/parser.c
View file @
f901f63b
...
...
@@ -602,14 +602,14 @@ static void test_SetupGetIntField(void)
}
keys
[]
=
{
/* key fields index expected int errorcode */
{
"Key
=
"
,
"48"
,
1
,
48
,
ERROR_SUCCESS
},
{
"Key
=
"
,
"48"
,
0
,
-
1
,
ERROR_INVALID_DATA
},
{
"123
=
"
,
"48"
,
0
,
123
,
ERROR_SUCCESS
},
{
"Key
=
"
,
"0x4"
,
1
,
4
,
ERROR_SUCCESS
},
{
"Key
=
"
,
"Field1"
,
1
,
-
1
,
ERROR_INVALID_DATA
},
{
"Key
=
"
,
"Field1,34"
,
2
,
34
,
ERROR_SUCCESS
},
{
"Key
=
"
,
"Field1,,Field3"
,
2
,
0
,
ERROR_SUCCESS
},
{
"Key
=
"
,
"Field1,"
,
2
,
0
,
ERROR_SUCCESS
}
{
"Key"
,
"48"
,
1
,
48
,
ERROR_SUCCESS
},
{
"Key"
,
"48"
,
0
,
-
1
,
ERROR_INVALID_DATA
},
{
"123"
,
"48"
,
0
,
123
,
ERROR_SUCCESS
},
{
"Key"
,
"0x4"
,
1
,
4
,
ERROR_SUCCESS
},
{
"Key"
,
"Field1"
,
1
,
-
1
,
ERROR_INVALID_DATA
},
{
"Key"
,
"Field1,34"
,
2
,
34
,
ERROR_SUCCESS
},
{
"Key"
,
"Field1,,Field3"
,
2
,
0
,
ERROR_SUCCESS
},
{
"Key"
,
"Field1,"
,
2
,
0
,
ERROR_SUCCESS
}
};
unsigned
int
i
;
...
...
@@ -624,22 +624,17 @@ static void test_SetupGetIntField(void)
strcpy
(
buffer
,
STD_HEADER
"[TestSection]
\n
"
);
strcat
(
buffer
,
keys
[
i
].
key
);
strcat
(
buffer
,
"="
);
strcat
(
buffer
,
keys
[
i
].
fields
);
hinf
=
test_file_contents
(
buffer
,
&
err
);
ok
(
hinf
!=
NULL
,
"Expected valid INF file
\n
"
);
SetupFindFirstLineA
(
hinf
,
"TestSection"
,
"Key"
,
&
context
);
SetupFindFirstLineA
(
hinf
,
"TestSection"
,
keys
[
i
].
key
,
&
context
);
SetLastError
(
0xdeadbeef
);
intfield
=
-
1
;
retb
=
SetupGetIntField
(
&
context
,
keys
[
i
].
index
,
&
intfield
);
if
(
keys
[
i
].
err
==
ERROR_SUCCESS
)
{
if
(
!
retb
&&
!
lstrcmpA
(
keys
[
i
].
key
,
"123="
)
)
{
win_skip
(
"results differ on Win9x
\n
"
);
SetupCloseInfFile
(
hinf
);
continue
;
}
ok
(
retb
,
"%u: Expected success
\n
"
,
i
);
ok
(
GetLastError
()
==
ERROR_SUCCESS
||
GetLastError
()
==
0xdeadbeef
/* win9x, NT4 */
,
...
...
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