Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f177dc9f
Commit
f177dc9f
authored
Feb 17, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Feb 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add tests for enumerating the source list after publishing.
parent
40aa7df3
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
122 additions
and
1 deletion
+122
-1
install.c
dlls/msi/tests/install.c
+117
-0
msi.h
include/msi.h
+5
-1
No files found.
dlls/msi/tests/install.c
View file @
f177dc9f
...
...
@@ -2898,6 +2898,7 @@ static void test_publishsourcelist(void)
UINT
r
;
DWORD
size
;
CHAR
value
[
MAX_PATH
];
CHAR
path
[
MAX_PATH
];
CHAR
prodcode
[]
=
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
;
CreateDirectoryA
(
"msitest"
,
NULL
);
...
...
@@ -2919,6 +2920,15 @@ static void test_publishsourcelist(void)
ok
(
r
==
ERROR_UNKNOWN_PRODUCT
,
"Expected ERROR_UNKNOWN_PRODUCT, got %d
\n
"
,
r
);
ok
(
size
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
size
);
size
=
0xdeadbeef
;
r
=
MsiSourceListEnumSourcesA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_URL
,
0
,
NULL
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_UNKNOWN_PRODUCT
,
"Expected ERROR_UNKNOWN_PRODUCT, got %d
\n
"
,
r
);
}
ok
(
size
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
size
);
r
=
MsiInstallProductA
(
msifile
,
"REGISTER_PRODUCT=1"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
pf_exists
(
"msitest
\\
maximus"
),
"File not installed
\n
"
);
...
...
@@ -2931,6 +2941,15 @@ static void test_publishsourcelist(void)
ok
(
r
==
ERROR_UNKNOWN_PRODUCT
,
"Expected ERROR_UNKNOWN_PRODUCT, got %d
\n
"
,
r
);
ok
(
size
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
size
);
size
=
0xdeadbeef
;
r
=
MsiSourceListEnumSourcesA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_URL
,
0
,
NULL
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_UNKNOWN_PRODUCT
,
"Expected ERROR_UNKNOWN_PRODUCT, got %d
\n
"
,
r
);
}
ok
(
size
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
size
);
r
=
MsiInstallProductA
(
msifile
,
"PROCESS_COMPONENTS=1"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
pf_exists
(
"msitest
\\
maximus"
),
"File not installed
\n
"
);
...
...
@@ -2943,6 +2962,15 @@ static void test_publishsourcelist(void)
ok
(
r
==
ERROR_UNKNOWN_PRODUCT
,
"Expected ERROR_UNKNOWN_PRODUCT, got %d
\n
"
,
r
);
ok
(
size
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
size
);
size
=
0xdeadbeef
;
r
=
MsiSourceListEnumSourcesA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_URL
,
0
,
NULL
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_UNKNOWN_PRODUCT
,
"Expected ERROR_UNKNOWN_PRODUCT, got %d
\n
"
,
r
);
}
ok
(
size
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
size
);
r
=
MsiInstallProductA
(
msifile
,
"PUBLISH_FEATURES=1"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
pf_exists
(
"msitest
\\
maximus"
),
"File not installed
\n
"
);
...
...
@@ -2955,6 +2983,15 @@ static void test_publishsourcelist(void)
ok
(
r
==
ERROR_UNKNOWN_PRODUCT
,
"Expected ERROR_UNKNOWN_PRODUCT, got %d
\n
"
,
r
);
ok
(
size
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
size
);
size
=
0xdeadbeef
;
r
=
MsiSourceListEnumSourcesA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_URL
,
0
,
NULL
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_UNKNOWN_PRODUCT
,
"Expected ERROR_UNKNOWN_PRODUCT, got %d
\n
"
,
r
);
}
ok
(
size
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
size
);
r
=
MsiInstallProductA
(
msifile
,
"PUBLISH_PRODUCT=1"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
pf_exists
(
"msitest
\\
maximus"
),
"File not installed
\n
"
);
...
...
@@ -2972,6 +3009,86 @@ static void test_publishsourcelist(void)
ok
(
size
==
11
,
"Expected 11, got %d
\n
"
,
size
);
}
size
=
MAX_PATH
;
lstrcpyA
(
value
,
"aaa"
);
r
=
pMsiSourceListGetInfoA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_MEDIAPACKAGEPATH
,
value
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
value
,
""
),
"Expected
\"\"
, got
\"
%s
\"\n
"
,
value
);
ok
(
size
==
0
,
"Expected 0, got %d
\n
"
,
size
);
}
size
=
MAX_PATH
;
lstrcpyA
(
value
,
"aaa"
);
r
=
pMsiSourceListGetInfoA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_DISKPROMPT
,
value
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
value
,
""
),
"Expected
\"\"
, got
\"
%s
\"\n
"
,
value
);
ok
(
size
==
0
,
"Expected 0, got %d
\n
"
,
size
);
}
lstrcpyA
(
path
,
CURR_DIR
);
lstrcatA
(
path
,
"
\\
"
);
size
=
MAX_PATH
;
lstrcpyA
(
value
,
"aaa"
);
r
=
pMsiSourceListGetInfoA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_LASTUSEDSOURCE
,
value
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
value
,
path
),
"Expected
\"
%s
\"
, got
\"
%s
\"\n
"
,
path
,
value
);
ok
(
size
==
lstrlenA
(
path
),
"Expected %d, got %d
\n
"
,
lstrlenA
(
path
),
size
);
}
size
=
MAX_PATH
;
lstrcpyA
(
value
,
"aaa"
);
r
=
pMsiSourceListGetInfoA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_LASTUSEDTYPE
,
value
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
value
,
"n"
),
"Expected
\"
n
\"
, got
\"
%s
\"\n
"
,
value
);
ok
(
size
==
1
,
"Expected 1, got %d
\n
"
,
size
);
}
size
=
MAX_PATH
;
lstrcpyA
(
value
,
"aaa"
);
r
=
MsiSourceListEnumSourcesA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_URL
,
0
,
value
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_NO_MORE_ITEMS
,
"Expected ERROR_NO_MORE_ITEMS, got %d
\n
"
,
r
);
}
ok
(
!
lstrcmpA
(
value
,
"aaa"
),
"Expected value to be unchanged, got %s
\n
"
,
value
);
ok
(
size
==
MAX_PATH
,
"Expected MAX_PATH, got %d
\n
"
,
size
);
size
=
MAX_PATH
;
lstrcpyA
(
value
,
"aaa"
);
r
=
MsiSourceListEnumSourcesA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_NETWORK
,
0
,
value
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
value
,
path
),
"Expected
\"
%s
\"
, got
\"
%s
\"\n
"
,
path
,
value
);
ok
(
size
==
lstrlenA
(
path
),
"Expected %d, got %d
\n
"
,
lstrlenA
(
path
),
size
);
}
size
=
MAX_PATH
;
lstrcpyA
(
value
,
"aaa"
);
r
=
MsiSourceListEnumSourcesA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
|
MSISOURCETYPE_NETWORK
,
1
,
value
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_NO_MORE_ITEMS
,
"Expected ERROR_NO_MORE_ITEMS, got %d
\n
"
,
r
);
}
ok
(
!
lstrcmpA
(
value
,
"aaa"
),
"Expected value to be unchanged, got %s
\n
"
,
value
);
ok
(
size
==
MAX_PATH
,
"Expected MAX_PATH, got %d
\n
"
,
size
);
/* complete uninstall */
r
=
MsiInstallProductA
(
msifile
,
"FULL=1 REMOVE=ALL"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
...
...
include/msi.h
View file @
f177dc9f
...
...
@@ -348,7 +348,7 @@ static const WCHAR INSTALLPROPERTY_MOREINFOURLW[] = {'M','o','r','e','I','n','f'
/* Source List Info */
#define INSTALLPROPERTY_LASTUSEDSOURCEA "LastUsedSource"
static
const
WCHAR
INSTALLPROPERTY_LASTUSEDSOURCEW
[]
=
{
'L'
,
'a'
,
's'
,
't'
,
'U'
,
's'
,
'e'
,
'd'
,
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
0
};
#define INSTALLPROPERTY_LASTUSEDSOURCE WINELIB_NAME_AW(INSTALLPROPERTY_LASTUSEDSOURCE
W
)
#define INSTALLPROPERTY_LASTUSEDSOURCE WINELIB_NAME_AW(INSTALLPROPERTY_LASTUSEDSOURCE)
#define INSTALLPROPERTY_LASTUSEDTYPEA "LastUsedType"
static
const
WCHAR
INSTALLPROPERTY_LASTUSEDTYPEW
[]
=
{
'L'
,
'a'
,
's'
,
't'
,
'U'
,
's'
,
'e'
,
'd'
,
'T'
,
'y'
,
'p'
,
'e'
,
0
};
...
...
@@ -537,6 +537,10 @@ UINT WINAPI MsiSourceListAddSourceA(LPCSTR, LPCSTR, DWORD, LPCSTR);
UINT
WINAPI
MsiSourceListAddSourceW
(
LPCWSTR
,
LPCWSTR
,
DWORD
,
LPCWSTR
);
#define MsiSourceListAddSource WINELIB_NAME_AW(MsiSourceListAddSource)
UINT
WINAPI
MsiSourceListEnumSourcesA
(
LPCSTR
,
LPCSTR
,
MSIINSTALLCONTEXT
,
DWORD
,
DWORD
,
LPSTR
,
LPDWORD
);
UINT
WINAPI
MsiSourceListEnumSourcesW
(
LPCWSTR
,
LPCWSTR
,
MSIINSTALLCONTEXT
,
DWORD
,
DWORD
,
LPWSTR
,
LPDWORD
);
#define MsiSourceListEnumSources WINELIB_NAME_AW(MsiSourceListEnumSources)
UINT
WINAPI
MsiSourceListClearAllA
(
LPCSTR
,
LPCSTR
,
DWORD
);
UINT
WINAPI
MsiSourceListClearAllW
(
LPCWSTR
,
LPCWSTR
,
DWORD
);
#define MsiSourceListClearAll WINELIB_NAME_AW(MsiSourceListClearAll)
...
...
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