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
ba257f0c
Commit
ba257f0c
authored
Jul 12, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Jul 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add a test for installing from different current working directories.
parent
6c940b9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
0 deletions
+75
-0
install.c
dlls/msi/tests/install.c
+75
-0
No files found.
dlls/msi/tests/install.c
View file @
ba257f0c
...
...
@@ -414,6 +414,11 @@ static const CHAR tp_component_dat[] = "Component\tComponentId\tDirectory_\tAttr
"Component
\t
Component
\n
"
"augustus
\t\t
MSITESTDIR
\t
0
\t
prop=
\"
val
\"\t
augustus
\n
"
;
static
const
CHAR
cwd_component_dat
[]
=
"Component
\t
ComponentId
\t
Directory_
\t
Attributes
\t
Condition
\t
KeyPath
\n
"
"s72
\t
S38
\t
s72
\t
i2
\t
S255
\t
S72
\n
"
"Component
\t
Component
\n
"
"augustus
\t\t
MSITESTDIR
\t
0
\t\t
augustus
\n
"
;
typedef
struct
_msi_table
{
const
CHAR
*
filename
;
...
...
@@ -612,6 +617,18 @@ static const msi_table tp_tables[] =
ADD_TABLE
(
property
),
};
static
const
msi_table
cwd_tables
[]
=
{
ADD_TABLE
(
cwd_component
),
ADD_TABLE
(
directory
),
ADD_TABLE
(
rof_feature
),
ADD_TABLE
(
ci2_feature_comp
),
ADD_TABLE
(
ci2_file
),
ADD_TABLE
(
install_exec_seq
),
ADD_TABLE
(
rof_media
),
ADD_TABLE
(
property
),
};
/* cabinet definitions */
/* make the max size large so there is only one cab file */
...
...
@@ -2464,6 +2481,63 @@ static void test_transformprop(void)
RemoveDirectory
(
"msitest"
);
}
static
void
test_currentworkingdir
(
void
)
{
UINT
r
;
CHAR
path
[
MAX_PATH
];
LPSTR
ptr
,
ptr2
;
CreateDirectoryA
(
"msitest"
,
NULL
);
create_file
(
"msitest
\\
augustus"
,
500
);
create_database
(
msifile
,
cwd_tables
,
sizeof
(
cwd_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
CreateDirectoryA
(
"diffdir"
,
NULL
);
SetCurrentDirectoryA
(
"diffdir"
);
sprintf
(
path
,
"..
\\
%s"
,
msifile
);
r
=
MsiInstallProductA
(
path
,
NULL
);
todo_wine
{
ok
(
r
==
ERROR_FILE_NOT_FOUND
,
"Expected ERROR_FILE_NOT_FOUND, got %u
\n
"
,
r
);
ok
(
!
delete_pf
(
"msitest
\\
augustus"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest"
,
FALSE
),
"File installed
\n
"
);
}
sprintf
(
path
,
"%s
\\
%s"
,
CURR_DIR
,
msifile
);
r
=
MsiInstallProductA
(
path
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
delete_pf
(
"msitest
\\
augustus"
,
TRUE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest"
,
FALSE
),
"File not installed
\n
"
);
lstrcpyA
(
path
,
CURR_DIR
);
if
(
path
[
lstrlenA
(
path
)
-
1
]
!=
'\\'
)
lstrcatA
(
path
,
"
\\
"
);
lstrcatA
(
path
,
"msitest.msi"
);
ptr2
=
strrchr
(
path
,
'\\'
);
*
ptr2
=
'\0'
;
ptr
=
strrchr
(
path
,
'\\'
);
*
ptr2
=
'\\'
;
*
(
ptr
++
)
=
'\0'
;
SetCurrentDirectoryA
(
path
);
r
=
MsiInstallProductA
(
ptr
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
delete_pf
(
"msitest
\\
augustus"
,
TRUE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest"
,
FALSE
),
"File not installed
\n
"
);
SetCurrentDirectoryA
(
CURR_DIR
);
DeleteFile
(
msifile
);
DeleteFile
(
"msitest
\\
augustus"
);
RemoveDirectory
(
"msitest"
);
RemoveDirectory
(
"diffdir"
);
}
START_TEST
(
install
)
{
DWORD
len
;
...
...
@@ -2497,6 +2571,7 @@ START_TEST(install)
test_publish
();
test_publishsourcelist
();
test_transformprop
();
test_currentworkingdir
();
SetCurrentDirectoryA
(
prev_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