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
75c866ed
Commit
75c866ed
authored
Jul 26, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Jul 27, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Test the column types of MSI packages.
parent
59a706bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
1 deletion
+68
-1
install.c
dlls/msi/tests/install.c
+68
-1
No files found.
dlls/msi/tests/install.c
View file @
75c866ed
...
...
@@ -126,7 +126,7 @@ static const CHAR install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
"WriteRegistryValues
\t\t
5000"
;
static
const
CHAR
media_dat
[]
=
"DiskId
\t
LastSequence
\t
DiskPrompt
\t
Cabinet
\t
VolumeLabel
\t
Source
\n
"
"i2
\t
i
2
\t
L64
\t
S255
\t
S32
\t
S72
\n
"
"i2
\t
i
4
\t
L64
\t
S255
\t
S32
\t
S72
\n
"
"Media
\t
DiskId
\n
"
"1
\t
3
\t\t\t
DISK1
\t\n
"
"2
\t
5
\t\t
msitest.cab
\t
DISK2
\t\n
"
;
...
...
@@ -316,6 +316,17 @@ static int fci_delete(char *pszFile, int *err, void *pv)
return
0
;
}
static
BOOL
check_record
(
MSIHANDLE
rec
,
UINT
field
,
LPSTR
val
)
{
CHAR
buffer
[
0x20
];
UINT
r
;
DWORD
sz
;
sz
=
sizeof
buffer
;
r
=
MsiRecordGetString
(
rec
,
field
,
buffer
,
&
sz
);
return
(
r
==
ERROR_SUCCESS
)
&&
!
strcmp
(
val
,
buffer
);
}
static
BOOL
get_temp_file
(
char
*
pszTempName
,
int
cbTempName
,
void
*
pv
)
{
LPSTR
tempname
;
...
...
@@ -679,6 +690,61 @@ static void test_MsiSetComponentState(void)
CoUninitialize
();
}
static
void
test_packagecoltypes
(
void
)
{
MSIHANDLE
hdb
,
view
,
rec
;
char
path
[
MAX_PATH
];
LPSTR
query
;
UINT
r
,
count
;
CoInitialize
(
NULL
);
lstrcpy
(
path
,
CURR_DIR
);
lstrcat
(
path
,
"
\\
"
);
lstrcat
(
path
,
msifile
);
r
=
MsiOpenDatabase
(
path
,
MSIDBOPEN_READONLY
,
&
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
query
=
"SELECT * FROM `Media`"
;
r
=
MsiDatabaseOpenView
(
hdb
,
query
,
&
view
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"MsiDatabaseOpenView failed
\n
"
);
}
r
=
MsiViewGetColumnInfo
(
view
,
MSICOLINFO_NAMES
,
&
rec
);
count
=
MsiRecordGetFieldCount
(
rec
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewGetColumnInfo failed
\n
"
);
ok
(
count
==
6
,
"Expected 6, got %d
\n
"
,
count
);
ok
(
check_record
(
rec
,
1
,
"DiskId"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
2
,
"LastSequence"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
3
,
"DiskPrompt"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
4
,
"Cabinet"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
5
,
"VolumeLabel"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
6
,
"Source"
),
"wrong column label
\n
"
);
}
r
=
MsiViewGetColumnInfo
(
view
,
MSICOLINFO_TYPES
,
&
rec
);
count
=
MsiRecordGetFieldCount
(
rec
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"MsiViewGetColumnInfo failed
\n
"
);
ok
(
count
==
6
,
"Expected 6, got %d
\n
"
,
count
);
ok
(
check_record
(
rec
,
1
,
"i2"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
2
,
"i4"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
3
,
"L64"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
4
,
"S255"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
5
,
"S32"
),
"wrong column label
\n
"
);
ok
(
check_record
(
rec
,
6
,
"S72"
),
"wrong column label
\n
"
);
}
MsiCloseHandle
(
hdb
);
DeleteFile
(
msifile
);
}
START_TEST
(
install
)
{
if
(
!
init_function_pointers
())
...
...
@@ -689,6 +755,7 @@ START_TEST(install)
test_MsiInstallProduct
();
test_MsiSetComponentState
();
test_packagecoltypes
();
delete_test_files
();
}
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