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
87acb935
Commit
87acb935
authored
Aug 03, 2018
by
Gijs Vermeulen
Committed by
Alexandre Julliard
Aug 15, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi/tests: Add SetupInstallFromInfSectionA test.
Signed-off-by:
Gijs Vermeulen
<
gijsvrm@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d45e6814
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
install.c
dlls/setupapi/tests/install.c
+40
-0
No files found.
dlls/setupapi/tests/install.c
View file @
87acb935
...
@@ -174,6 +174,45 @@ static void test_registry(void)
...
@@ -174,6 +174,45 @@ static void test_registry(void)
ok
(
ret
,
"Expected source inf to exist, last error was %d
\n
"
,
GetLastError
());
ok
(
ret
,
"Expected source inf to exist, last error was %d
\n
"
,
GetLastError
());
}
}
static
void
test_install_from
(
void
)
{
char
path
[
MAX_PATH
];
HINF
infhandle
;
HKEY
key
;
LONG
res
;
BOOL
ret
;
/* First create a registry structure we would like to be deleted */
ok
(
!
RegCreateKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
setupapitest
\\
setupapitest"
,
&
key
),
"Expected RegCreateKeyA to succeed
\n
"
);
/* Doublecheck if the registry key is present */
ok
(
!
RegOpenKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
setupapitest
\\
setupapitest"
,
&
key
),
"Expected registry key to exist
\n
"
);
create_inf_file
(
inffile
,
cmdline_inf_reg
);
sprintf
(
path
,
"%s
\\
%s"
,
CURR_DIR
,
inffile
);
infhandle
=
SetupOpenInfFileA
(
path
,
NULL
,
INF_STYLE_WIN4
,
NULL
);
SetLastError
(
0xdeadbeef
);
ret
=
SetupInstallFromInfSectionA
(
NULL
,
infhandle
,
"DefaultInstall"
,
SPINST_REGISTRY
,
key
,
"A:
\\
"
,
0
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
ret
,
"Unexpected failure
\n
"
);
ok
(
GetLastError
()
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %08x
\n
"
,
GetLastError
());
/* Check if the registry key is recursively deleted */
res
=
RegOpenKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
setupapitest"
,
&
key
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"Didn't expect the registry key to exist
\n
"
);
/* Just in case */
if
(
res
==
ERROR_SUCCESS
)
{
RegDeleteKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
setupapitest
\\
setupapitest"
);
RegDeleteKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
setupapitest"
);
}
SetupCloseInfFile
(
infhandle
);
DeleteFileA
(
inffile
);
}
static
void
test_install_svc_from
(
void
)
static
void
test_install_svc_from
(
void
)
{
{
char
inf
[
2048
];
char
inf
[
2048
];
...
@@ -742,6 +781,7 @@ START_TEST(install)
...
@@ -742,6 +781,7 @@ START_TEST(install)
test_cmdline
();
test_cmdline
();
test_registry
();
test_registry
();
test_install_from
();
test_install_svc_from
();
test_install_svc_from
();
test_driver_install
();
test_driver_install
();
test_dirid
();
test_dirid
();
...
...
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