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
6f8fb2f4
Commit
6f8fb2f4
authored
Dec 08, 2009
by
Stefan Leichter
Committed by
Alexandre Julliard
Dec 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi32/tests: More tests for SetupGetInfFileListW.
parent
d90aca35
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
0 deletions
+56
-0
install.c
dlls/setupapi/tests/install.c
+56
-0
No files found.
dlls/setupapi/tests/install.c
View file @
6f8fb2f4
...
...
@@ -473,9 +473,16 @@ static void test_inffilelist(void)
static
const
char
inffile2
[]
=
"test2.inf"
;
static
const
WCHAR
inffile2W
[]
=
{
't'
,
'e'
,
's'
,
't'
,
'2'
,
'.'
,
'i'
,
'n'
,
'f'
,
0
};
static
const
char
invalid_inf
[]
=
"invalid.inf"
;
static
const
WCHAR
invalid_infW
[]
=
{
'i'
,
'n'
,
'v'
,
'a'
,
'l'
,
'i'
,
'd'
,
'.'
,
'i'
,
'n'
,
'f'
,
0
};
static
const
char
*
inf
=
"[Version]
\n
"
"Signature=
\"
$Chicago$
\"
"
;
static
const
char
*
inf2
=
"[Version]
\n
"
"Signature=
\"
$CHICAGO$
\"
"
;
static
const
char
*
infNT
=
"[Version]
\n
"
"Signature=
\"
$WINDOWS NT$
\"
"
;
WCHAR
*
p
,
*
ptr
;
char
dirA
[
MAX_PATH
];
...
...
@@ -587,6 +594,55 @@ static void test_inffilelist(void)
ok
(
!
lstrcmpW
(
p
,
inffile2W
)
||
!
lstrcmpW
(
p
,
inffileW
),
"unexpected filename %s
\n
"
,
wine_dbgstr_w
(
p
));
/* upper case value
*/
create_inf_file
(
inffile2
,
inf2
);
ret
=
pSetupGetInfFileListW
(
dir
,
INF_STYLE_WIN4
,
buffer
,
MAX_PATH
,
&
outsize
);
ok
(
ret
,
"expected SetupGetInfFileListW to succeed!
\n
"
);
todo_wine
ok
(
expected
==
outsize
,
"expected required buffersize to be %d, got %d
\n
"
,
expected
,
outsize
);
for
(
p
=
buffer
;
lstrlenW
(
p
)
&&
(
outsize
>
(
p
-
buffer
));
p
+=
lstrlenW
(
p
)
+
1
)
ok
(
!
lstrcmpW
(
p
,
inffile2W
)
||
!
lstrcmpW
(
p
,
inffileW
),
"unexpected filename %s
\n
"
,
wine_dbgstr_w
(
p
));
/* signature Windows NT is also inf style win4
*/
create_inf_file
(
inffile2
,
infNT
);
expected
=
3
+
strlen
(
inffile
)
+
strlen
(
inffile2
);
ret
=
pSetupGetInfFileListW
(
dir
,
INF_STYLE_WIN4
,
buffer
,
MAX_PATH
,
&
outsize
);
ok
(
ret
,
"expected SetupGetInfFileListW to succeed!
\n
"
);
todo_wine
ok
(
expected
==
outsize
,
"expected required buffersize to be %d, got %d
\n
"
,
expected
,
outsize
);
for
(
p
=
buffer
;
lstrlenW
(
p
)
&&
(
outsize
>
(
p
-
buffer
));
p
+=
lstrlenW
(
p
)
+
1
)
ok
(
!
lstrcmpW
(
p
,
inffile2W
)
||
!
lstrcmpW
(
p
,
inffileW
),
"unexpected filename %s
\n
"
,
wine_dbgstr_w
(
p
));
/* old style
*/
expected
=
2
+
strlen
(
invalid_inf
);
ret
=
pSetupGetInfFileListW
(
dir
,
INF_STYLE_OLDNT
,
buffer
,
MAX_PATH
,
&
outsize
);
ok
(
ret
,
"expected SetupGetInfFileListW to succeed!
\n
"
);
todo_wine
ok
(
expected
==
outsize
,
"expected required buffersize to be %d, got %d
\n
"
,
expected
,
outsize
);
for
(
p
=
buffer
;
lstrlenW
(
p
)
&&
(
outsize
>
(
p
-
buffer
));
p
+=
lstrlenW
(
p
)
+
1
)
ok
(
!
lstrcmpW
(
p
,
invalid_infW
),
"unexpected filename %s
\n
"
,
wine_dbgstr_w
(
p
));
/* mixed style
*/
expected
=
4
+
strlen
(
inffile
)
+
strlen
(
inffile2
)
+
strlen
(
invalid_inf
);
ret
=
pSetupGetInfFileListW
(
dir
,
INF_STYLE_OLDNT
|
INF_STYLE_WIN4
,
buffer
,
MAX_PATH
,
&
outsize
);
ok
(
ret
,
"expected SetupGetInfFileListW to succeed!
\n
"
);
todo_wine
ok
(
expected
==
outsize
,
"expected required buffersize to be %d, got %d
\n
"
,
expected
,
outsize
);
for
(
p
=
buffer
;
lstrlenW
(
p
)
&&
(
outsize
>
(
p
-
buffer
));
p
+=
lstrlenW
(
p
)
+
1
)
ok
(
!
lstrcmpW
(
p
,
inffile2W
)
||
!
lstrcmpW
(
p
,
inffileW
)
||
!
lstrcmpW
(
p
,
invalid_infW
),
"unexpected filename %s
\n
"
,
wine_dbgstr_w
(
p
));
DeleteFile
(
inffile
);
DeleteFile
(
inffile2
);
DeleteFile
(
invalid_inf
);
...
...
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