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
ba7f633f
Commit
ba7f633f
authored
Oct 15, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advpack/tests: Compile with -D__WINESRC__.
parent
f6b2aa4a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
60 deletions
+59
-60
Makefile.in
dlls/advpack/tests/Makefile.in
+0
-1
advpack.c
dlls/advpack/tests/advpack.c
+37
-37
files.c
dlls/advpack/tests/files.c
+5
-5
install.c
dlls/advpack/tests/install.c
+17
-17
No files found.
dlls/advpack/tests/Makefile.in
View file @
ba7f633f
TESTDLL
=
advpack.dll
TESTDLL
=
advpack.dll
IMPORTS
=
cabinet advapi32 advpack
IMPORTS
=
cabinet advapi32 advpack
EXTRADEFS
=
-U__WINESRC__
-DWINE_STRICT_PROTOTYPES
-DWINE_NO_NAMELESS_EXTENSION
-DWIDL_C_INLINE_WRAPPERS
C_SRCS
=
\
C_SRCS
=
\
advpack.c
\
advpack.c
\
...
...
dlls/advpack/tests/advpack.c
View file @
ba7f633f
This diff is collapsed.
Click to expand it.
dlls/advpack/tests/files.c
View file @
ba7f633f
...
@@ -135,7 +135,7 @@ static void test_AddDelBackupEntry(void)
...
@@ -135,7 +135,7 @@ static void test_AddDelBackupEntry(void)
/* create the INF file */
/* create the INF file */
res
=
pAddDelBackupEntry
(
"one
\0
two
\0
three
\0
"
,
"c:
\\
"
,
"basename"
,
AADBE_ADD_ENTRY
);
res
=
pAddDelBackupEntry
(
"one
\0
two
\0
three
\0
"
,
"c:
\\
"
,
"basename"
,
AADBE_ADD_ENTRY
);
ok
(
res
==
S_OK
,
"Expected S_OK, got %d
\n
"
,
res
);
ok
(
res
==
S_OK
,
"Expected S_OK, got %d
\n
"
,
res
);
if
(
GetFileAttributes
(
path
)
!=
INVALID_FILE_ATTRIBUTES
)
if
(
GetFileAttributes
A
(
path
)
!=
INVALID_FILE_ATTRIBUTES
)
{
{
ok
(
check_ini_file_attr
(
path
),
"Expected ini file to be hidden
\n
"
);
ok
(
check_ini_file_attr
(
path
),
"Expected ini file to be hidden
\n
"
);
ok
(
DeleteFileA
(
path
),
"Expected path to exist
\n
"
);
ok
(
DeleteFileA
(
path
),
"Expected path to exist
\n
"
);
...
@@ -310,8 +310,8 @@ static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime,
...
@@ -310,8 +310,8 @@ static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime,
DWORD
attrs
;
DWORD
attrs
;
BOOL
res
;
BOOL
res
;
handle
=
CreateFile
(
pszName
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
handle
=
CreateFile
A
(
pszName
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
|
FILE_FLAG_SEQUENTIAL_SCAN
,
NULL
);
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
|
FILE_FLAG_SEQUENTIAL_SCAN
,
NULL
);
ok
(
handle
!=
INVALID_HANDLE_VALUE
,
"Failed to CreateFile %s
\n
"
,
pszName
);
ok
(
handle
!=
INVALID_HANDLE_VALUE
,
"Failed to CreateFile %s
\n
"
,
pszName
);
...
@@ -321,7 +321,7 @@ static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime,
...
@@ -321,7 +321,7 @@ static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime,
FileTimeToLocalFileTime
(
&
finfo
.
ftLastWriteTime
,
&
filetime
);
FileTimeToLocalFileTime
(
&
finfo
.
ftLastWriteTime
,
&
filetime
);
FileTimeToDosDateTime
(
&
filetime
,
pdate
,
ptime
);
FileTimeToDosDateTime
(
&
filetime
,
pdate
,
ptime
);
attrs
=
GetFileAttributes
(
pszName
);
attrs
=
GetFileAttributes
A
(
pszName
);
ok
(
attrs
!=
INVALID_FILE_ATTRIBUTES
,
"Failed to GetFileAttributes
\n
"
);
ok
(
attrs
!=
INVALID_FILE_ATTRIBUTES
,
"Failed to GetFileAttributes
\n
"
);
return
(
INT_PTR
)
handle
;
return
(
INT_PTR
)
handle
;
...
@@ -551,7 +551,7 @@ START_TEST(files)
...
@@ -551,7 +551,7 @@ START_TEST(files)
init_function_pointers
();
init_function_pointers
();
GetCurrentDirectoryA
(
MAX_PATH
,
prev_path
);
GetCurrentDirectoryA
(
MAX_PATH
,
prev_path
);
GetTempPath
(
MAX_PATH
,
temp_path
);
GetTempPath
A
(
MAX_PATH
,
temp_path
);
SetCurrentDirectoryA
(
temp_path
);
SetCurrentDirectoryA
(
temp_path
);
lstrcpyA
(
CURR_DIR
,
temp_path
);
lstrcpyA
(
CURR_DIR
,
temp_path
);
...
...
dlls/advpack/tests/install.c
View file @
ba7f633f
...
@@ -58,8 +58,8 @@ static BOOL is_spapi_err(DWORD err)
...
@@ -58,8 +58,8 @@ static BOOL is_spapi_err(DWORD err)
static
void
create_inf_file
(
LPCSTR
filename
)
static
void
create_inf_file
(
LPCSTR
filename
)
{
{
DWORD
dwNumberOfBytesWritten
;
DWORD
dwNumberOfBytesWritten
;
HANDLE
hf
=
CreateFile
(
filename
,
GENERIC_WRITE
,
0
,
NULL
,
HANDLE
hf
=
CreateFile
A
(
filename
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
static
const
char
data
[]
=
static
const
char
data
[]
=
"[Version]
\n
"
"[Version]
\n
"
...
@@ -124,10 +124,10 @@ static void test_RunSetupCommand(void)
...
@@ -124,10 +124,10 @@ static void test_RunSetupCommand(void)
create_inf_file
(
"one
\\
test.inf"
);
create_inf_file
(
"one
\\
test.inf"
);
/* try a full path to the INF, with working dir provided */
/* try a full path to the INF, with working dir provided */
lstrcpy
(
path
,
CURR_DIR
);
lstrcpy
A
(
path
,
CURR_DIR
);
lstrcat
(
path
,
"
\\
one
\\
test.inf"
);
lstrcat
A
(
path
,
"
\\
one
\\
test.inf"
);
lstrcpy
(
dir
,
CURR_DIR
);
lstrcpy
A
(
dir
,
CURR_DIR
);
lstrcat
(
dir
,
"
\\
one"
);
lstrcat
A
(
dir
,
"
\\
one"
);
hr
=
pRunSetupCommand
(
NULL
,
path
,
"DefaultInstall"
,
dir
,
"Title"
,
NULL
,
RSC_FLAG_INF
|
RSC_FLAG_QUIET
,
NULL
);
hr
=
pRunSetupCommand
(
NULL
,
path
,
"DefaultInstall"
,
dir
,
"Title"
,
NULL
,
RSC_FLAG_INF
|
RSC_FLAG_QUIET
,
NULL
);
ok
(
hr
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
hr
);
ok
(
hr
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
hr
);
...
@@ -205,9 +205,9 @@ static void test_LaunchINFSection(void)
...
@@ -205,9 +205,9 @@ static void test_LaunchINFSection(void)
create_inf_file
(
"one
\\
test.inf"
);
create_inf_file
(
"one
\\
test.inf"
);
/* try a full path to the INF */
/* try a full path to the INF */
lstrcpy
(
cmdline
,
CURR_DIR
);
lstrcpy
A
(
cmdline
,
CURR_DIR
);
lstrcat
(
cmdline
,
"
\\
"
);
lstrcat
A
(
cmdline
,
"
\\
"
);
lstrcat
(
cmdline
,
"one
\\
test.inf,DefaultInstall,,4"
);
lstrcat
A
(
cmdline
,
"one
\\
test.inf,DefaultInstall,,4"
);
hr
=
pLaunchINFSection
(
NULL
,
NULL
,
cmdline
,
0
);
hr
=
pLaunchINFSection
(
NULL
,
NULL
,
cmdline
,
0
);
ok
(
hr
==
0
,
"Expected 0, got %d
\n
"
,
hr
);
ok
(
hr
==
0
,
"Expected 0, got %d
\n
"
,
hr
);
...
@@ -231,16 +231,16 @@ static void test_LaunchINFSectionEx(void)
...
@@ -231,16 +231,16 @@ static void test_LaunchINFSectionEx(void)
create_inf_file
(
"test.inf"
);
create_inf_file
(
"test.inf"
);
/* try an invalid CAB filename with an absolute INF name */
/* try an invalid CAB filename with an absolute INF name */
lstrcpy
(
cmdline
,
CURR_DIR
);
lstrcpy
A
(
cmdline
,
CURR_DIR
);
lstrcat
(
cmdline
,
"
\\
"
);
lstrcat
A
(
cmdline
,
"
\\
"
);
lstrcat
(
cmdline
,
"test.inf,DefaultInstall,c:imacab.cab,4"
);
lstrcat
A
(
cmdline
,
"test.inf,DefaultInstall,c:imacab.cab,4"
);
hr
=
pLaunchINFSectionEx
(
NULL
,
NULL
,
cmdline
,
0
);
hr
=
pLaunchINFSectionEx
(
NULL
,
NULL
,
cmdline
,
0
);
ok
(
hr
==
0
,
"Expected 0, got %d
\n
"
,
hr
);
ok
(
hr
==
0
,
"Expected 0, got %d
\n
"
,
hr
);
/* try quoting the parameters */
/* try quoting the parameters */
lstrcpy
(
cmdline
,
"
\"
"
);
lstrcpy
A
(
cmdline
,
"
\"
"
);
lstrcat
(
cmdline
,
CURR_DIR
);
lstrcat
A
(
cmdline
,
CURR_DIR
);
lstrcat
(
cmdline
,
"
\\
test.inf
\"
,
\"
DefaultInstall
\"
,
\"
c:,imacab.cab
\"
,
\"
4
\"
"
);
lstrcat
A
(
cmdline
,
"
\\
test.inf
\"
,
\"
DefaultInstall
\"
,
\"
c:,imacab.cab
\"
,
\"
4
\"
"
);
hr
=
pLaunchINFSectionEx
(
NULL
,
NULL
,
cmdline
,
0
);
hr
=
pLaunchINFSectionEx
(
NULL
,
NULL
,
cmdline
,
0
);
ok
(
hr
==
0
,
"Expected 0, got %d
\n
"
,
hr
);
ok
(
hr
==
0
,
"Expected 0, got %d
\n
"
,
hr
);
...
@@ -250,7 +250,7 @@ static void test_LaunchINFSectionEx(void)
...
@@ -250,7 +250,7 @@ static void test_LaunchINFSectionEx(void)
if
(
winetest_interactive
)
if
(
winetest_interactive
)
{
{
/* try an invalid CAB filename with a relative INF name */
/* try an invalid CAB filename with a relative INF name */
lstrcpy
(
cmdline
,
"test.inf,DefaultInstall,c:imacab.cab,4"
);
lstrcpy
A
(
cmdline
,
"test.inf,DefaultInstall,c:imacab.cab,4"
);
hr
=
pLaunchINFSectionEx
(
NULL
,
NULL
,
cmdline
,
0
);
hr
=
pLaunchINFSectionEx
(
NULL
,
NULL
,
cmdline
,
0
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %d
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %d
\n
"
,
hr
);
}
}
...
@@ -273,7 +273,7 @@ START_TEST(install)
...
@@ -273,7 +273,7 @@ START_TEST(install)
}
}
GetCurrentDirectoryA
(
MAX_PATH
,
prev_path
);
GetCurrentDirectoryA
(
MAX_PATH
,
prev_path
);
GetTempPath
(
MAX_PATH
,
temp_path
);
GetTempPath
A
(
MAX_PATH
,
temp_path
);
SetCurrentDirectoryA
(
temp_path
);
SetCurrentDirectoryA
(
temp_path
);
lstrcpyA
(
CURR_DIR
,
temp_path
);
lstrcpyA
(
CURR_DIR
,
temp_path
);
...
...
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