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
868de4d5
Commit
868de4d5
authored
Feb 24, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Feb 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add more tests for MsiSourceListGetInfo.
parent
28cf008c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
153 additions
and
1 deletion
+153
-1
source.c
dlls/msi/tests/source.c
+153
-1
No files found.
dlls/msi/tests/source.c
View file @
868de4d5
...
@@ -160,7 +160,7 @@ static void test_MsiSourceListGetInfo(void)
...
@@ -160,7 +160,7 @@ static void test_MsiSourceListGetInfo(void)
LPCSTR
data
;
LPCSTR
data
;
LONG
res
;
LONG
res
;
UINT
r
;
UINT
r
;
HKEY
userkey
,
hkey
;
HKEY
userkey
,
hkey
,
media
;
DWORD
size
;
DWORD
size
;
if
(
!
pMsiSourceListGetInfoA
)
if
(
!
pMsiSourceListGetInfoA
)
...
@@ -332,6 +332,158 @@ static void test_MsiSourceListGetInfo(void)
...
@@ -332,6 +332,158 @@ static void test_MsiSourceListGetInfo(void)
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
size
==
11
,
"Expected 11, got %d
\n
"
,
size
);
ok
(
size
==
11
,
"Expected 11, got %d
\n
"
,
size
);
res
=
RegCreateKeyA
(
hkey
,
"Media"
,
&
media
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
data
=
"path"
;
res
=
RegSetValueExA
(
media
,
"MediaPackage"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
data
,
lstrlenA
(
data
)
+
1
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
/* INSTALLPROPERTY_MEDIAPACKAGEPATH */
size
=
MAX_PATH
;
r
=
pMsiSourceListGetInfoA
(
prodcode
,
usersid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_MEDIAPACKAGEPATH
,
value
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
value
,
"path"
),
"Expected
\"
path
\"
, got
\"
%s
\"\n
"
,
value
);
ok
(
size
==
4
,
"Expected 4, got %d
\n
"
,
size
);
}
/* INSTALLPROPERTY_DISKPROMPT */
data
=
"prompt"
;
res
=
RegSetValueExA
(
media
,
"DiskPrompt"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
data
,
lstrlenA
(
data
)
+
1
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
size
=
MAX_PATH
;
r
=
pMsiSourceListGetInfoA
(
prodcode
,
usersid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_DISKPROMPT
,
value
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
value
,
"prompt"
),
"Expected
\"
prompt
\"
, got
\"
%s
\"\n
"
,
value
);
ok
(
size
==
6
,
"Expected 6, got %d
\n
"
,
size
);
data
=
"source"
;
res
=
RegSetValueExA
(
hkey
,
"LastUsedSource"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
data
,
lstrlenA
(
data
)
+
1
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
/* INSTALLPROPERTY_LASTUSEDSOURCE */
size
=
MAX_PATH
;
r
=
pMsiSourceListGetInfoA
(
prodcode
,
usersid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_LASTUSEDSOURCE
,
value
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
value
,
"source"
),
"Expected
\"
source
\"
, got
\"
%s
\"\n
"
,
value
);
ok
(
size
==
6
,
"Expected 6, got %d
\n
"
,
size
);
}
/* INSTALLPROPERTY_LASTUSEDTYPE, invalid source format */
size
=
MAX_PATH
;
r
=
pMsiSourceListGetInfoA
(
prodcode
,
usersid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_LASTUSEDTYPE
,
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
);
}
data
=
"x;y;z"
;
res
=
RegSetValueExA
(
hkey
,
"LastUsedSource"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
data
,
lstrlenA
(
data
)
+
1
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
/* INSTALLPROPERTY_LASTUSEDTYPE, invalid source format */
size
=
MAX_PATH
;
r
=
pMsiSourceListGetInfoA
(
prodcode
,
usersid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_LASTUSEDTYPE
,
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
);
}
data
=
"n;y;z"
;
res
=
RegSetValueExA
(
hkey
,
"LastUsedSource"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
data
,
lstrlenA
(
data
)
+
1
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
/* INSTALLPROPERTY_LASTUSEDTYPE */
size
=
MAX_PATH
;
r
=
pMsiSourceListGetInfoA
(
prodcode
,
usersid
,
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
);
}
data
=
"negatory"
;
res
=
RegSetValueExA
(
hkey
,
"LastUsedSource"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
data
,
lstrlenA
(
data
)
+
1
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
/* INSTALLPROPERTY_LASTUSEDTYPE */
size
=
MAX_PATH
;
r
=
pMsiSourceListGetInfoA
(
prodcode
,
usersid
,
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
);
}
data
=
"megatron"
;
res
=
RegSetValueExA
(
hkey
,
"LastUsedSource"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
data
,
lstrlenA
(
data
)
+
1
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
/* INSTALLPROPERTY_LASTUSEDTYPE */
size
=
MAX_PATH
;
r
=
pMsiSourceListGetInfoA
(
prodcode
,
usersid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_LASTUSEDTYPE
,
value
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
value
,
"m"
),
"Expected
\"
m
\"
, got
\"
%s
\"\n
"
,
value
);
ok
(
size
==
1
,
"Expected 1, got %d
\n
"
,
size
);
}
data
=
"useless"
;
res
=
RegSetValueExA
(
hkey
,
"LastUsedSource"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
data
,
lstrlenA
(
data
)
+
1
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
/* INSTALLPROPERTY_LASTUSEDTYPE */
size
=
MAX_PATH
;
r
=
pMsiSourceListGetInfoA
(
prodcode
,
usersid
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_LASTUSEDTYPE
,
value
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
value
,
"u"
),
"Expected
\"
u
\"
, got
\"
%s
\"\n
"
,
value
);
ok
(
size
==
1
,
"Expected 1, got %d
\n
"
,
size
);
}
RegDeleteValueA
(
media
,
"MediaPackage"
);
RegDeleteValueA
(
media
,
"DiskPrompt"
);
RegDeleteKeyA
(
media
,
""
);
RegDeleteValueA
(
hkey
,
"LastUsedSource"
);
RegDeleteValueA
(
hkey
,
"nonexistent"
);
RegDeleteValueA
(
hkey
,
"nonexistent"
);
RegDeleteValueA
(
hkey
,
"PackageName"
);
RegDeleteValueA
(
hkey
,
"PackageName"
);
RegDeleteKeyA
(
hkey
,
""
);
RegDeleteKeyA
(
hkey
,
""
);
...
...
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