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
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
IMPORTS
=
cabinet advapi32 advpack
EXTRADEFS
=
-U__WINESRC__
-DWINE_STRICT_PROTOTYPES
-DWINE_NO_NAMELESS_EXTENSION
-DWIDL_C_INLINE_WRAPPERS
C_SRCS
=
\
advpack.c
\
...
...
dlls/advpack/tests/advpack.c
View file @
ba7f633f
...
...
@@ -32,15 +32,15 @@
/* defines for the SetPerUserSecValues tests */
#define GUID_KEY "SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\guid"
#define REG_VAL_EXISTS(key, value) !RegQueryValueEx(key, value, NULL, NULL, NULL, NULL)
#define OPEN_GUID_KEY() !RegOpenKey(HKEY_LOCAL_MACHINE, GUID_KEY, &guid)
#define REG_VAL_EXISTS(key, value) !RegQueryValueEx
A
(key, value, NULL, NULL, NULL, NULL)
#define OPEN_GUID_KEY() !RegOpenKey
A
(HKEY_LOCAL_MACHINE, GUID_KEY, &guid)
static
HMODULE
hAdvPack
;
static
HRESULT
(
WINAPI
*
pCloseINFEngine
)(
HINF
);
static
HRESULT
(
WINAPI
*
pDelNode
)(
LPCSTR
,
DWORD
);
static
HRESULT
(
WINAPI
*
pGetVersionFromFile
)(
LPCSTR
,
LPDWORD
,
LPDWORD
,
BOOL
);
static
HRESULT
(
WINAPI
*
pOpenINFEngine
)(
PCSTR
,
PCSTR
,
DWORD
,
HINF
*
,
PVOID
);
static
HRESULT
(
WINAPI
*
pSetPerUserSecValues
)(
PPERUSERSECTION
pPerUser
);
static
HRESULT
(
WINAPI
*
pSetPerUserSecValues
)(
PPERUSERSECTION
A
pPerUser
);
static
HRESULT
(
WINAPI
*
pTranslateInfString
)(
LPCSTR
,
LPCSTR
,
LPCSTR
,
LPCSTR
,
LPSTR
,
DWORD
,
LPDWORD
,
LPVOID
);
static
HRESULT
(
WINAPI
*
pTranslateInfStringEx
)(
HINF
,
PCSTR
,
PCSTR
,
PCSTR
,
PSTR
,
DWORD
,
PDWORD
,
PVOID
);
...
...
@@ -147,45 +147,45 @@ static void delnode_test(void)
ok
(
hr
==
E_FAIL
,
"DelNode called with empty pathname should return E_FAIL
\n
"
);
/* Test deletion of a file. */
hn
=
CreateFile
(
"DelNodeTestFile1"
,
GENERIC_WRITE
,
0
,
NULL
,
hn
=
CreateFile
A
(
"DelNodeTestFile1"
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
assert
(
hn
!=
INVALID_HANDLE_VALUE
);
CloseHandle
(
hn
);
hr
=
pDelNode
(
lstrcat
(
currDir
,
"
\\
DelNodeTestFile1"
),
0
);
hr
=
pDelNode
(
lstrcat
A
(
currDir
,
"
\\
DelNodeTestFile1"
),
0
);
ok
(
hr
==
S_OK
,
"DelNode failed deleting a single file
\n
"
);
currDir
[
currDirLen
]
=
'\0'
;
/* Test deletion of an empty directory. */
CreateDirectoryA
(
"DelNodeTestDir"
,
NULL
);
hr
=
pDelNode
(
lstrcat
(
currDir
,
"
\\
DelNodeTestDir"
),
0
);
hr
=
pDelNode
(
lstrcat
A
(
currDir
,
"
\\
DelNodeTestDir"
),
0
);
ok
(
hr
==
S_OK
,
"DelNode failed deleting an empty directory
\n
"
);
currDir
[
currDirLen
]
=
'\0'
;
/* Test deletion of a directory containing one file. */
CreateDirectoryA
(
"DelNodeTestDir"
,
NULL
);
hn
=
CreateFile
(
"DelNodeTestDir
\\
DelNodeTestFile1"
,
GENERIC_WRITE
,
0
,
NULL
,
hn
=
CreateFile
A
(
"DelNodeTestDir
\\
DelNodeTestFile1"
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
assert
(
hn
!=
INVALID_HANDLE_VALUE
);
CloseHandle
(
hn
);
hr
=
pDelNode
(
lstrcat
(
currDir
,
"
\\
DelNodeTestDir"
),
0
);
hr
=
pDelNode
(
lstrcat
A
(
currDir
,
"
\\
DelNodeTestDir"
),
0
);
ok
(
hr
==
S_OK
,
"DelNode failed deleting a directory containing one file
\n
"
);
currDir
[
currDirLen
]
=
'\0'
;
/* Test deletion of a directory containing multiple files. */
CreateDirectoryA
(
"DelNodeTestDir"
,
NULL
);
hn
=
CreateFile
(
"DelNodeTestDir
\\
DelNodeTestFile1"
,
GENERIC_WRITE
,
0
,
NULL
,
hn
=
CreateFile
A
(
"DelNodeTestDir
\\
DelNodeTestFile1"
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
assert
(
hn
!=
INVALID_HANDLE_VALUE
);
CloseHandle
(
hn
);
hn
=
CreateFile
(
"DelNodeTestDir
\\
DelNodeTestFile2"
,
GENERIC_WRITE
,
0
,
NULL
,
hn
=
CreateFile
A
(
"DelNodeTestDir
\\
DelNodeTestFile2"
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
assert
(
hn
!=
INVALID_HANDLE_VALUE
);
CloseHandle
(
hn
);
hn
=
CreateFile
(
"DelNodeTestDir
\\
DelNodeTestFile3"
,
GENERIC_WRITE
,
0
,
NULL
,
hn
=
CreateFile
A
(
"DelNodeTestDir
\\
DelNodeTestFile3"
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
assert
(
hn
!=
INVALID_HANDLE_VALUE
);
CloseHandle
(
hn
);
hr
=
pDelNode
(
lstrcat
(
currDir
,
"
\\
DelNodeTestDir"
),
0
);
hr
=
pDelNode
(
lstrcat
A
(
currDir
,
"
\\
DelNodeTestDir"
),
0
);
ok
(
hr
==
S_OK
,
"DelNode failed deleting a directory containing multiple files
\n
"
);
currDir
[
currDirLen
]
=
'\0'
;
}
...
...
@@ -205,8 +205,8 @@ static void create_inf_file(void)
char
data
[
1024
];
char
*
ptr
=
data
;
DWORD
dwNumberOfBytesWritten
;
HANDLE
hf
=
CreateFile
(
inf_file
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
HANDLE
hf
=
CreateFile
A
(
inf_file
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
append_str
(
&
ptr
,
"[Version]
\n
"
);
append_str
(
&
ptr
,
"Signature=
\"
$Chicago$
\"\n
"
);
...
...
@@ -319,8 +319,8 @@ static void translateinfstring_test(void)
ok
(
dwSize
==
25
,
"Expected size 25, got %d
\n
"
,
dwSize
);
}
DeleteFile
(
"c:
\\
a.inf"
);
DeleteFile
(
inf_file
);
DeleteFile
A
(
"c:
\\
a.inf"
);
DeleteFile
A
(
inf_file
);
}
static
void
translateinfstringex_test
(
void
)
...
...
@@ -444,7 +444,7 @@ static void translateinfstringex_test(void)
hr
=
pTranslateInfStringEx
(
hinf
,
inf_file
,
"Options.NTx86"
,
"Result1"
,
buffer
,
size
,
&
size
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
!
lstrcmpi
(
buffer
,
PROG_FILES_ROOT
),
ok
(
!
lstrcmpi
A
(
buffer
,
PROG_FILES_ROOT
),
"Expected %s, got %s
\n
"
,
PROG_FILES_ROOT
,
buffer
);
ok
(
size
==
strlen
(
PROG_FILES_ROOT
)
+
1
,
"Expected size %d, got %d
\n
"
,
lstrlenA
(
PROG_FILES_ROOT
)
+
1
,
size
);
...
...
@@ -455,14 +455,14 @@ static void translateinfstringex_test(void)
hr
=
pTranslateInfStringEx
(
hinf
,
inf_file
,
"Options.NTx86"
,
"Result2"
,
buffer
,
size
,
&
size
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
!
lstrcmpi
(
buffer
,
PROG_FILES_ROOT
),
ok
(
!
lstrcmpi
A
(
buffer
,
PROG_FILES_ROOT
),
"Expected %s, got %s
\n
"
,
PROG_FILES_ROOT
,
buffer
);
ok
(
size
==
strlen
(
PROG_FILES_ROOT
)
+
1
,
"Expected size %d, got %d
\n
"
,
lstrlenA
(
PROG_FILES_ROOT
)
+
1
,
size
);
{
char
drive
[
MAX_PATH
];
lstrcpy
(
drive
,
PROG_FILES_ROOT
);
lstrcpy
A
(
drive
,
PROG_FILES_ROOT
);
drive
[
3
]
=
0x00
;
/* Just keep the system drive plus '\' */
memset
(
buffer
,
'a'
,
APP_PATH_LEN
);
...
...
@@ -471,7 +471,7 @@ static void translateinfstringex_test(void)
hr
=
pTranslateInfStringEx
(
hinf
,
inf_file
,
"Options.NTx86"
,
"Result3"
,
buffer
,
size
,
&
size
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
!
lstrcmpi
(
buffer
,
drive
),
ok
(
!
lstrcmpi
A
(
buffer
,
drive
),
"Expected %s, got %s
\n
"
,
drive
,
buffer
);
ok
(
size
==
strlen
(
drive
)
+
1
,
"Expected size %d, got %d
\n
"
,
lstrlenA
(
drive
)
+
1
,
size
);
...
...
@@ -488,7 +488,7 @@ static void translateinfstringex_test(void)
char
data
[
1024
];
char
*
ptr
=
data
;
DWORD
dwNumberOfBytesWritten
;
HANDLE
hf
=
CreateFile
(
inf_file
,
GENERIC_WRITE
,
0
,
NULL
,
HANDLE
hf
=
CreateFile
A
(
inf_file
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
append_str
(
&
ptr
,
"[Version]
\n
"
);
...
...
@@ -529,7 +529,7 @@ static void translateinfstringex_test(void)
hr
=
pTranslateInfStringEx
(
hinf
,
inf_file
,
"Options.NTx86"
,
"Result2"
,
buffer
,
size
,
&
size
,
NULL
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
!
lstrcmpi
(
buffer
,
PROG_FILES_ROOT
),
ok
(
!
lstrcmpi
A
(
buffer
,
PROG_FILES_ROOT
),
"Expected %s, got %s
\n
"
,
PROG_FILES_ROOT
,
buffer
);
ok
(
size
==
strlen
(
PROG_FILES_ROOT
)
+
1
,
"Expected size %d, got %d
\n
"
,
lstrlenA
(
PROG_FILES_ROOT
)
+
1
,
size
);
...
...
@@ -546,10 +546,10 @@ static BOOL check_reg_str(HKEY hkey, LPCSTR name, LPCSTR value)
DWORD
size
=
MAX_PATH
;
char
check
[
MAX_PATH
];
if
(
RegQueryValueEx
(
hkey
,
name
,
NULL
,
NULL
,
(
LPBYTE
)
check
,
&
size
))
if
(
RegQueryValueEx
A
(
hkey
,
name
,
NULL
,
NULL
,
(
LPBYTE
)
check
,
&
size
))
return
FALSE
;
return
!
lstrcmp
(
check
,
value
);
return
!
lstrcmp
A
(
check
,
value
);
}
static
BOOL
check_reg_dword
(
HKEY
hkey
,
LPCSTR
name
,
DWORD
value
)
...
...
@@ -557,7 +557,7 @@ static BOOL check_reg_dword(HKEY hkey, LPCSTR name, DWORD value)
DWORD
size
=
sizeof
(
DWORD
);
DWORD
check
;
if
(
RegQueryValueEx
(
hkey
,
name
,
NULL
,
NULL
,
(
LPBYTE
)
&
check
,
&
size
))
if
(
RegQueryValueEx
A
(
hkey
,
name
,
NULL
,
NULL
,
(
LPBYTE
)
&
check
,
&
size
))
return
FALSE
;
return
(
check
==
value
);
...
...
@@ -565,15 +565,15 @@ static BOOL check_reg_dword(HKEY hkey, LPCSTR name, DWORD value)
static
void
setperusersecvalues_test
(
void
)
{
PERUSERSECTION
peruser
;
PERUSERSECTION
A
peruser
;
HRESULT
hr
;
HKEY
guid
;
lstrcpy
(
peruser
.
szDispName
,
"displayname"
);
lstrcpy
(
peruser
.
szLocale
,
"locale"
);
lstrcpy
(
peruser
.
szStub
,
"stub"
);
lstrcpy
(
peruser
.
szVersion
,
"1,1,1,1"
);
lstrcpy
(
peruser
.
szCompID
,
"compid"
);
lstrcpy
A
(
peruser
.
szDispName
,
"displayname"
);
lstrcpy
A
(
peruser
.
szLocale
,
"locale"
);
lstrcpy
A
(
peruser
.
szStub
,
"stub"
);
lstrcpy
A
(
peruser
.
szVersion
,
"1,1,1,1"
);
lstrcpy
A
(
peruser
.
szCompID
,
"compid"
);
peruser
.
dwIsInstalled
=
1
;
peruser
.
bRollback
=
FALSE
;
...
...
@@ -594,7 +594,7 @@ static void setperusersecvalues_test(void)
ok
(
!
OPEN_GUID_KEY
(),
"Expected guid key to not exist
\n
"
);
/* set initial values */
lstrcpy
(
peruser
.
szGUID
,
"guid"
);
lstrcpy
A
(
peruser
.
szGUID
,
"guid"
);
hr
=
pSetPerUserSecValues
(
&
peruser
);
if
(
hr
==
E_FAIL
)
{
...
...
@@ -616,7 +616,7 @@ static void setperusersecvalues_test(void)
ok
(
!
REG_VAL_EXISTS
(
guid
,
"RealStubPath"
),
"Expected RealStubPath to not exist
\n
"
);
/* raise the version, but bRollback is FALSE, so vals not saved */
lstrcpy
(
peruser
.
szVersion
,
"2,1,1,1"
);
lstrcpy
A
(
peruser
.
szVersion
,
"2,1,1,1"
);
hr
=
pSetPerUserSecValues
(
&
peruser
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
check_reg_str
(
guid
,
NULL
,
"displayname"
),
"Expected displayname
\n
"
);
...
...
@@ -633,7 +633,7 @@ static void setperusersecvalues_test(void)
/* raise the version again, bRollback is TRUE so vals are saved */
peruser
.
bRollback
=
TRUE
;
lstrcpy
(
peruser
.
szVersion
,
"3,1,1,1"
);
lstrcpy
A
(
peruser
.
szVersion
,
"3,1,1,1"
);
hr
=
pSetPerUserSecValues
(
&
peruser
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
ok
(
check_reg_str
(
guid
,
NULL
,
"displayname"
),
"Expected displayname
\n
"
);
...
...
@@ -653,7 +653,7 @@ static void setperusersecvalues_test(void)
"Expected real stub
\n
"
);
}
RegDeleteKey
(
HKEY_LOCAL_MACHINE
,
GUID_KEY
);
RegDeleteKey
A
(
HKEY_LOCAL_MACHINE
,
GUID_KEY
);
}
START_TEST
(
advpack
)
...
...
@@ -664,8 +664,8 @@ START_TEST(advpack)
/* Make sure we create the temporary file in a directory
* were we have enough rights
*/
GetTempPath
(
MAX_PATH
,
inf_file
);
lstrcat
(
inf_file
,
"test.inf"
);
GetTempPath
A
(
MAX_PATH
,
inf_file
);
lstrcat
A
(
inf_file
,
"test.inf"
);
get_progfiles_dir
();
...
...
dlls/advpack/tests/files.c
View file @
ba7f633f
...
...
@@ -135,7 +135,7 @@ static void test_AddDelBackupEntry(void)
/* create the INF file */
res
=
pAddDelBackupEntry
(
"one
\0
two
\0
three
\0
"
,
"c:
\\
"
,
"basename"
,
AADBE_ADD_ENTRY
);
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
(
DeleteFileA
(
path
),
"Expected path to exist
\n
"
);
...
...
@@ -310,8 +310,8 @@ static INT_PTR CDECL get_open_info(char *pszName, USHORT *pdate, USHORT *ptime,
DWORD
attrs
;
BOOL
res
;
handle
=
CreateFile
(
pszName
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
|
FILE_FLAG_SEQUENTIAL_SCAN
,
NULL
);
handle
=
CreateFile
A
(
pszName
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
|
FILE_FLAG_SEQUENTIAL_SCAN
,
NULL
);
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,
FileTimeToLocalFileTime
(
&
finfo
.
ftLastWriteTime
,
&
filetime
);
FileTimeToDosDateTime
(
&
filetime
,
pdate
,
ptime
);
attrs
=
GetFileAttributes
(
pszName
);
attrs
=
GetFileAttributes
A
(
pszName
);
ok
(
attrs
!=
INVALID_FILE_ATTRIBUTES
,
"Failed to GetFileAttributes
\n
"
);
return
(
INT_PTR
)
handle
;
...
...
@@ -551,7 +551,7 @@ START_TEST(files)
init_function_pointers
();
GetCurrentDirectoryA
(
MAX_PATH
,
prev_path
);
GetTempPath
(
MAX_PATH
,
temp_path
);
GetTempPath
A
(
MAX_PATH
,
temp_path
);
SetCurrentDirectoryA
(
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)
static
void
create_inf_file
(
LPCSTR
filename
)
{
DWORD
dwNumberOfBytesWritten
;
HANDLE
hf
=
CreateFile
(
filename
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
HANDLE
hf
=
CreateFile
A
(
filename
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
static
const
char
data
[]
=
"[Version]
\n
"
...
...
@@ -124,10 +124,10 @@ static void test_RunSetupCommand(void)
create_inf_file
(
"one
\\
test.inf"
);
/* try a full path to the INF, with working dir provided */
lstrcpy
(
path
,
CURR_DIR
);
lstrcat
(
path
,
"
\\
one
\\
test.inf"
);
lstrcpy
(
dir
,
CURR_DIR
);
lstrcat
(
dir
,
"
\\
one"
);
lstrcpy
A
(
path
,
CURR_DIR
);
lstrcat
A
(
path
,
"
\\
one
\\
test.inf"
);
lstrcpy
A
(
dir
,
CURR_DIR
);
lstrcat
A
(
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 %d
\n
"
,
hr
);
...
...
@@ -205,9 +205,9 @@ static void test_LaunchINFSection(void)
create_inf_file
(
"one
\\
test.inf"
);
/* try a full path to the INF */
lstrcpy
(
cmdline
,
CURR_DIR
);
lstrcat
(
cmdline
,
"
\\
"
);
lstrcat
(
cmdline
,
"one
\\
test.inf,DefaultInstall,,4"
);
lstrcpy
A
(
cmdline
,
CURR_DIR
);
lstrcat
A
(
cmdline
,
"
\\
"
);
lstrcat
A
(
cmdline
,
"one
\\
test.inf,DefaultInstall,,4"
);
hr
=
pLaunchINFSection
(
NULL
,
NULL
,
cmdline
,
0
);
ok
(
hr
==
0
,
"Expected 0, got %d
\n
"
,
hr
);
...
...
@@ -231,16 +231,16 @@ static void test_LaunchINFSectionEx(void)
create_inf_file
(
"test.inf"
);
/* try an invalid CAB filename with an absolute INF name */
lstrcpy
(
cmdline
,
CURR_DIR
);
lstrcat
(
cmdline
,
"
\\
"
);
lstrcat
(
cmdline
,
"test.inf,DefaultInstall,c:imacab.cab,4"
);
lstrcpy
A
(
cmdline
,
CURR_DIR
);
lstrcat
A
(
cmdline
,
"
\\
"
);
lstrcat
A
(
cmdline
,
"test.inf,DefaultInstall,c:imacab.cab,4"
);
hr
=
pLaunchINFSectionEx
(
NULL
,
NULL
,
cmdline
,
0
);
ok
(
hr
==
0
,
"Expected 0, got %d
\n
"
,
hr
);
/* try quoting the parameters */
lstrcpy
(
cmdline
,
"
\"
"
);
lstrcat
(
cmdline
,
CURR_DIR
);
lstrcat
(
cmdline
,
"
\\
test.inf
\"
,
\"
DefaultInstall
\"
,
\"
c:,imacab.cab
\"
,
\"
4
\"
"
);
lstrcpy
A
(
cmdline
,
"
\"
"
);
lstrcat
A
(
cmdline
,
CURR_DIR
);
lstrcat
A
(
cmdline
,
"
\\
test.inf
\"
,
\"
DefaultInstall
\"
,
\"
c:,imacab.cab
\"
,
\"
4
\"
"
);
hr
=
pLaunchINFSectionEx
(
NULL
,
NULL
,
cmdline
,
0
);
ok
(
hr
==
0
,
"Expected 0, got %d
\n
"
,
hr
);
...
...
@@ -250,7 +250,7 @@ static void test_LaunchINFSectionEx(void)
if
(
winetest_interactive
)
{
/* 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
);
ok
(
hr
==
E_INVALIDARG
,
"Expected E_INVALIDARG, got %d
\n
"
,
hr
);
}
...
...
@@ -273,7 +273,7 @@ START_TEST(install)
}
GetCurrentDirectoryA
(
MAX_PATH
,
prev_path
);
GetTempPath
(
MAX_PATH
,
temp_path
);
GetTempPath
A
(
MAX_PATH
,
temp_path
);
SetCurrentDirectoryA
(
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