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
d7c0a0e3
Commit
d7c0a0e3
authored
Oct 11, 2006
by
Michael Ploujnikov
Committed by
Alexandre Julliard
Oct 12, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advpack/tests: Win64 printf format warning fixes.
parent
30f30e5e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
78 deletions
+77
-78
Makefile.in
dlls/advpack/tests/Makefile.in
+0
-1
advpack.c
dlls/advpack/tests/advpack.c
+33
-33
files.c
dlls/advpack/tests/files.c
+23
-23
install.c
dlls/advpack/tests/install.c
+21
-21
No files found.
dlls/advpack/tests/Makefile.in
View file @
d7c0a0e3
...
...
@@ -4,7 +4,6 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
TESTDLL
=
advpack.dll
IMPORTS
=
cabinet user32 advapi32 kernel32
EXTRADEFS
=
-DWINE_NO_LONG_AS_INT
CTESTS
=
\
advpack.c
\
...
...
dlls/advpack/tests/advpack.c
View file @
d7c0a0e3
This diff is collapsed.
Click to expand it.
dlls/advpack/tests/files.c
View file @
d7c0a0e3
This diff is collapsed.
Click to expand it.
dlls/advpack/tests/install.c
View file @
d7c0a0e3
...
...
@@ -89,17 +89,17 @@ static void test_RunSetupCommand()
/* try an invalid cmd name */
hr
=
pRunSetupCommand
(
NULL
,
NULL
,
"Install"
,
"Dir"
,
"Title"
,
NULL
,
0
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %
l
d
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %d
\n
"
,
hr
);
/* try an invalid directory */
hr
=
pRunSetupCommand
(
NULL
,
"winver.exe"
,
"Install"
,
NULL
,
"Title"
,
NULL
,
0
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %
l
d
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %d
\n
"
,
hr
);
/* try to run a nonexistent exe */
hexe
=
(
HANDLE
)
0xdeadbeef
;
hr
=
pRunSetupCommand
(
NULL
,
"idontexist.exe"
,
"Install"
,
"c:
\\
windows
\\
system32"
,
"Title"
,
&
hexe
,
0
,
NULL
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %
l
d
\n
"
,
hr
);
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d
\n
"
,
hr
);
ok
(
hexe
==
NULL
,
"Expcted hexe to be NULL
\n
"
);
ok
(
!
TerminateProcess
(
hexe
,
0
),
"Expected TerminateProcess to fail
\n
"
);
...
...
@@ -107,21 +107,21 @@ static void test_RunSetupCommand()
hexe
=
(
HANDLE
)
0xdeadbeef
;
hr
=
pRunSetupCommand
(
NULL
,
"winver.exe"
,
"Install"
,
"non
\\
existent
\\
directory"
,
"Title"
,
&
hexe
,
0
,
NULL
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_DIRECTORY
),
"Expected HRESULT_FROM_WIN32(ERROR_DIRECTORY), got %
l
d
\n
"
,
hr
);
"Expected HRESULT_FROM_WIN32(ERROR_DIRECTORY), got %d
\n
"
,
hr
);
ok
(
hexe
==
NULL
,
"Expcted hexe to be NULL
\n
"
);
ok
(
!
TerminateProcess
(
hexe
,
0
),
"Expected TerminateProcess to fail
\n
"
);
/* try to run an exe with the RSC_FLAG_INF flag */
hexe
=
(
HANDLE
)
0xdeadbeef
;
hr
=
pRunSetupCommand
(
NULL
,
"winver.exe"
,
"Install"
,
"c:
\\
windows
\\
system32"
,
"Title"
,
&
hexe
,
RSC_FLAG_INF
|
RSC_FLAG_QUIET
,
NULL
);
ok
(
is_spapi_err
(
hr
),
"Expected a setupapi error, got %
l
d
\n
"
,
hr
);
ok
(
is_spapi_err
(
hr
),
"Expected a setupapi error, got %d
\n
"
,
hr
);
ok
(
hexe
==
(
HANDLE
)
0xdeadbeef
,
"Expected hexe to be 0xdeadbeef
\n
"
);
ok
(
!
TerminateProcess
(
hexe
,
0
),
"Expected TerminateProcess to fail
\n
"
);
/* run winver.exe */
hexe
=
(
HANDLE
)
0xdeadbeef
;
hr
=
pRunSetupCommand
(
NULL
,
"winver.exe"
,
"Install"
,
"c:
\\
windows
\\
system32"
,
"Title"
,
&
hexe
,
0
,
NULL
);
ok
(
hr
==
S_ASYNCHRONOUS
,
"Expected S_ASYNCHRONOUS, got %
l
d
\n
"
,
hr
);
ok
(
hr
==
S_ASYNCHRONOUS
,
"Expected S_ASYNCHRONOUS, got %d
\n
"
,
hr
);
ok
(
hexe
!=
NULL
,
"Expected hexe to be non-NULL
\n
"
);
ok
(
TerminateProcess
(
hexe
,
0
),
"Expected TerminateProcess to succeed
\n
"
);
...
...
@@ -134,44 +134,44 @@ static void test_RunSetupCommand()
lstrcpy
(
dir
,
CURR_DIR
);
lstrcat
(
dir
,
"
\\
one"
);
hr
=
pRunSetupCommand
(
NULL
,
path
,
"DefaultInstall"
,
dir
,
"Title"
,
NULL
,
RSC_FLAG_INF
|
RSC_FLAG_QUIET
,
NULL
);
ok
(
hr
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %
l
d
\n
"
,
hr
);
ok
(
hr
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
hr
);
/* try a full path to the INF, NULL working dir */
hr
=
pRunSetupCommand
(
NULL
,
path
,
"DefaultInstall"
,
NULL
,
"Title"
,
NULL
,
RSC_FLAG_INF
|
RSC_FLAG_QUIET
,
NULL
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_INVALID_PARAMETER
),
"Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %
l
d
\n
"
,
hr
);
"Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d
\n
"
,
hr
);
/* try a full path to the INF, empty working dir */
hr
=
pRunSetupCommand
(
NULL
,
path
,
"DefaultInstall"
,
""
,
"Title"
,
NULL
,
RSC_FLAG_INF
|
RSC_FLAG_QUIET
,
NULL
);
ok
(
hr
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %
l
d
\n
"
,
hr
);
ok
(
hr
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
hr
);
/* try a relative path to the INF, with working dir provided */
hr
=
pRunSetupCommand
(
NULL
,
"one
\\
test.inf"
,
"DefaultInstall"
,
dir
,
"Title"
,
NULL
,
RSC_FLAG_INF
|
RSC_FLAG_QUIET
,
NULL
);
ok
(
hr
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %
l
d
\n
"
,
hr
);
ok
(
hr
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
hr
);
/* try a relative path to the INF, NULL working dir */
hr
=
pRunSetupCommand
(
NULL
,
"one
\\
test.inf"
,
"DefaultInstall"
,
NULL
,
"Title"
,
NULL
,
RSC_FLAG_INF
|
RSC_FLAG_QUIET
,
NULL
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_INVALID_PARAMETER
),
"Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %
l
d
\n
"
,
hr
);
"Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d
\n
"
,
hr
);
/* try a relative path to the INF, empty working dir */
hr
=
pRunSetupCommand
(
NULL
,
"one
\\
test.inf"
,
"DefaultInstall"
,
""
,
"Title"
,
NULL
,
RSC_FLAG_INF
|
RSC_FLAG_QUIET
,
NULL
);
ok
(
hr
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %
l
d
\n
"
,
hr
);
ok
(
hr
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
hr
);
/* try only the INF filename, with working dir provided */
hr
=
pRunSetupCommand
(
NULL
,
"test.inf"
,
"DefaultInstall"
,
dir
,
"Title"
,
NULL
,
RSC_FLAG_INF
|
RSC_FLAG_QUIET
,
NULL
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %
l
d
\n
"
,
hr
);
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d
\n
"
,
hr
);
/* try only the INF filename, NULL working dir */
hr
=
pRunSetupCommand
(
NULL
,
"test.inf"
,
"DefaultInstall"
,
NULL
,
"Title"
,
NULL
,
RSC_FLAG_INF
|
RSC_FLAG_QUIET
,
NULL
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_INVALID_PARAMETER
),
"Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %
l
d
\n
"
,
hr
);
"Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d
\n
"
,
hr
);
/* try only the INF filename, empty working dir */
hr
=
pRunSetupCommand
(
NULL
,
"test.inf"
,
"DefaultInstall"
,
""
,
"Title"
,
NULL
,
RSC_FLAG_INF
|
RSC_FLAG_QUIET
,
NULL
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %
l
d
\n
"
,
hr
);
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d
\n
"
,
hr
);
DeleteFileA
(
"one
\\
test.inf"
);
RemoveDirectoryA
(
"one"
);
...
...
@@ -181,17 +181,17 @@ static void test_RunSetupCommand()
/* try INF file in the current directory, working directory provided */
hr
=
pRunSetupCommand
(
NULL
,
"test.inf"
,
"DefaultInstall"
,
CURR_DIR
,
"Title"
,
NULL
,
RSC_FLAG_INF
|
RSC_FLAG_QUIET
,
NULL
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %
l
d
\n
"
,
hr
);
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d
\n
"
,
hr
);
/* try INF file in the current directory, NULL working directory */
hr
=
pRunSetupCommand
(
NULL
,
"test.inf"
,
"DefaultInstall"
,
NULL
,
"Title"
,
NULL
,
RSC_FLAG_INF
|
RSC_FLAG_QUIET
,
NULL
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_INVALID_PARAMETER
),
"Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %
l
d
\n
"
,
hr
);
"Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d
\n
"
,
hr
);
/* try INF file in the current directory, empty working directory */
hr
=
pRunSetupCommand
(
NULL
,
"test.inf"
,
"DefaultInstall"
,
CURR_DIR
,
"Title"
,
NULL
,
RSC_FLAG_INF
|
RSC_FLAG_QUIET
,
NULL
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
),
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %
l
d
\n
"
,
hr
);
"Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d
\n
"
,
hr
);
}
static
void
test_LaunchINFSection
()
...
...
@@ -202,7 +202,7 @@ static void test_LaunchINFSection()
/* try an invalid cmdline */
hr
=
pLaunchINFSection
(
NULL
,
NULL
,
NULL
,
0
);
ok
(
hr
==
1
,
"Expected 1, got %
l
d
\n
"
,
hr
);
ok
(
hr
==
1
,
"Expected 1, got %d
\n
"
,
hr
);
CreateDirectoryA
(
"one"
,
NULL
);
create_inf_file
(
"one
\\
test.inf"
);
...
...
@@ -212,7 +212,7 @@ static void test_LaunchINFSection()
lstrcat
(
cmdline
,
"
\\
"
);
lstrcat
(
cmdline
,
"one
\\
test.inf,DefaultInstall,,4"
);
hr
=
pLaunchINFSection
(
NULL
,
NULL
,
cmdline
,
0
);
ok
(
hr
==
0
,
"Expected 0, got %
l
d
\n
"
,
hr
);
ok
(
hr
==
0
,
"Expected 0, got %d
\n
"
,
hr
);
DeleteFileA
(
"one
\\
test.inf"
);
RemoveDirectoryA
(
"one"
);
...
...
@@ -221,7 +221,7 @@ static void test_LaunchINFSection()
/* try just the INF filename */
hr
=
pLaunchINFSection
(
NULL
,
NULL
,
file
,
0
);
ok
(
hr
==
0
,
"Expected 0, got %
l
d
\n
"
,
hr
);
ok
(
hr
==
0
,
"Expected 0, got %d
\n
"
,
hr
);
DeleteFileA
(
"test.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