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
69c6fff3
Commit
69c6fff3
authored
Nov 20, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Nov 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add another test for the SourceDir property.
parent
ebf27335
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
0 deletions
+77
-0
package.c
dlls/msi/tests/package.c
+77
-0
No files found.
dlls/msi/tests/package.c
View file @
69c6fff3
...
...
@@ -2893,6 +2893,82 @@ static void test_sourcedirprop(void)
DeleteFileA
(
msifile
);
}
static
void
test_prop_path
(
void
)
{
MSIHANDLE
hpkg
,
hdb
;
char
buffer
[
MAX_PATH
],
cwd
[
MAX_PATH
];
DWORD
sz
;
UINT
r
;
GetCurrentDirectory
(
MAX_PATH
,
cwd
);
strcat
(
cwd
,
"
\\
"
);
hdb
=
create_package_db
();
ok
(
hdb
,
"failed to create database
\n
"
);
r
=
add_directory_entry
(
hdb
,
"'TARGETDIR','','SourceDir'"
);
ok
(
r
==
ERROR_SUCCESS
,
"cannot add directory: %d
\n
"
,
r
);
r
=
add_directory_entry
(
hdb
,
"'foo','TARGETDIR','foosrc:footgt'"
);
ok
(
r
==
ERROR_SUCCESS
,
"cannot add directory: %d
\n
"
,
r
);
hpkg
=
package_from_db
(
hdb
);
ok
(
hpkg
,
"failed to create package
\n
"
);
r
=
MsiGetSourcePath
(
hpkg
,
"SourceDir"
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_DIRECTORY
,
"failed to get source path
\n
"
);
r
=
MsiGetSourcePath
(
hpkg
,
"SOURCEDIR"
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_DIRECTORY
,
"failed to get source path
\n
"
);
r
=
MsiDoAction
(
hpkg
,
"CostInitialize"
);
ok
(
r
==
ERROR_SUCCESS
,
"cost init failed
\n
"
);
sz
=
sizeof
buffer
;
buffer
[
0
]
=
0
;
r
=
MsiGetProperty
(
hpkg
,
"SourceDir"
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"property not set
\n
"
);
ok
(
!
buffer
[
0
],
"SourceDir should be empty
\n
"
);
sz
=
sizeof
buffer
;
buffer
[
0
]
=
0
;
r
=
MsiGetProperty
(
hpkg
,
"SOURCEDIR"
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"property not set
\n
"
);
ok
(
!
buffer
[
0
],
"SourceDir should be empty
\n
"
);
sz
=
sizeof
buffer
;
buffer
[
0
]
=
0
;
r
=
MsiGetSourcePath
(
hpkg
,
"SourceDir"
,
buffer
,
&
sz
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"failed to get source path
\n
"
);
ok
(
!
lstrcmpi
(
cwd
,
buffer
),
"SourceDir (%s) should be current dir (%s)
\n
"
,
buffer
,
cwd
);
}
sz
=
sizeof
buffer
;
buffer
[
0
]
=
0
;
r
=
MsiGetProperty
(
hpkg
,
"SourceDir"
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"property not set
\n
"
);
todo_wine
{
ok
(
!
lstrcmpi
(
cwd
,
buffer
),
"SourceDir (%s) should be current dir (%s)
\n
"
,
buffer
,
cwd
);
}
sz
=
sizeof
buffer
;
buffer
[
0
]
=
0
;
r
=
MsiGetSourcePath
(
hpkg
,
"SOURCEDIR"
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_DIRECTORY
,
"failed to get source path
\n
"
);
sz
=
sizeof
buffer
;
buffer
[
0
]
=
0
;
r
=
MsiGetProperty
(
hpkg
,
"SOURCEDIR"
,
buffer
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"property not set
\n
"
);
todo_wine
{
ok
(
!
lstrcmpi
(
cwd
,
buffer
),
"SourceDir (%s) should be current dir (%s)
\n
"
,
buffer
,
cwd
);
}
MsiCloseHandle
(
hpkg
);
DeleteFile
(
msifile
);
}
START_TEST
(
package
)
{
test_createpackage
();
...
...
@@ -2913,4 +2989,5 @@ START_TEST(package)
test_featureparents
();
test_installprops
();
test_sourcedirprop
();
test_prop_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