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
326a1b6c
Commit
326a1b6c
authored
Oct 20, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Oct 20, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add more tests for the RegLocator part of the AppSearch action.
parent
859bd01b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
91 additions
and
6 deletions
+91
-6
package.c
dlls/msi/tests/package.c
+91
-6
No files found.
dlls/msi/tests/package.c
View file @
326a1b6c
...
...
@@ -6149,6 +6149,7 @@ static void test_appsearch_reglocator(void)
HKEY
hklm
,
classes
;
HKEY
hkcu
,
users
;
LPCSTR
str
;
LPSTR
ptr
;
LONG
res
;
UINT
r
;
...
...
@@ -6328,6 +6329,21 @@ static void test_appsearch_reglocator(void)
r
=
add_appsearch_entry
(
hdb
,
"'SIGPROP23', 'NewSignature23'"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
add_appsearch_entry
(
hdb
,
"'SIGPROP24', 'NewSignature24'"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
add_appsearch_entry
(
hdb
,
"'SIGPROP25', 'NewSignature25'"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
add_appsearch_entry
(
hdb
,
"'SIGPROP26', 'NewSignature26'"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
add_appsearch_entry
(
hdb
,
"'SIGPROP27', 'NewSignature27'"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
add_appsearch_entry
(
hdb
,
"'SIGPROP28', 'NewSignature28'"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
create_reglocator_table
(
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
...
...
@@ -6371,12 +6387,12 @@ static void test_appsearch_reglocator(void)
r
=
add_reglocator_entry
(
hdb
,
str
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
/* HKLM, msidbLocatorTypeFileName, file exists */
/* HKLM, msidbLocatorTypeFileName,
signature,
file exists */
str
=
"'NewSignature9', 2, 'Software
\\
Wine', 'Value9', 1"
;
r
=
add_reglocator_entry
(
hdb
,
str
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
/* HKLM, msidbLocatorTypeFileName, file does not exist */
/* HKLM, msidbLocatorTypeFileName,
signature,
file does not exist */
str
=
"'NewSignature10', 2, 'Software
\\
Wine', 'Value10', 1"
;
r
=
add_reglocator_entry
(
hdb
,
str
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
...
...
@@ -6386,17 +6402,17 @@ static void test_appsearch_reglocator(void)
r
=
add_reglocator_entry
(
hdb
,
str
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
/* HKLM, msidbLocatorTypeDirectory, file exists */
/* HKLM, msidbLocatorTypeDirectory,
no signature,
file exists */
str
=
"'NewSignature12', 2, 'Software
\\
Wine', 'Value9', 0"
;
r
=
add_reglocator_entry
(
hdb
,
str
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
/* HKLM, msidbLocatorTypeDirectory,
directory
*/
/* HKLM, msidbLocatorTypeDirectory,
no signature, directory exists
*/
str
=
"'NewSignature13', 2, 'Software
\\
Wine', 'Value11', 0"
;
r
=
add_reglocator_entry
(
hdb
,
str
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
/* HKLM, msidbLocatorTypeDirectory,
file exists, with signature
*/
/* HKLM, msidbLocatorTypeDirectory,
signature, file exists
*/
str
=
"'NewSignature14', 2, 'Software
\\
Wine', 'Value9', 0"
;
r
=
add_reglocator_entry
(
hdb
,
str
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
...
...
@@ -6431,7 +6447,7 @@ static void test_appsearch_reglocator(void)
r
=
add_reglocator_entry
(
hdb
,
str
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
/* HKLM, msidbLocatorTypeFileName,
file exists w/ version, signature
*/
/* HKLM, msidbLocatorTypeFileName,
signature, file exists w/ version
*/
str
=
"'NewSignature21', 2, 'Software
\\
Wine', 'Value13', 1"
;
r
=
add_reglocator_entry
(
hdb
,
str
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
...
...
@@ -6446,6 +6462,31 @@ static void test_appsearch_reglocator(void)
r
=
add_reglocator_entry
(
hdb
,
str
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
/* HKLM, msidbLocatorTypeFileName, no signature, directory exists */
str
=
"'NewSignature24', 2, 'Software
\\
Wine', 'Value11', 1"
;
r
=
add_reglocator_entry
(
hdb
,
str
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
/* HKLM, msidbLocatorTypeFileName, no signature, file does not exist */
str
=
"'NewSignature25', 2, 'Software
\\
Wine', 'Value10', 1"
;
r
=
add_reglocator_entry
(
hdb
,
str
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
/* HKLM, msidbLocatorTypeDirectory, signature, directory exists */
str
=
"'NewSignature26', 2, 'Software
\\
Wine', 'Value11', 0"
;
r
=
add_reglocator_entry
(
hdb
,
str
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
/* HKLM, msidbLocatorTypeDirectory, signature, file does not exist */
str
=
"'NewSignature27', 2, 'Software
\\
Wine', 'Value10', 0"
;
r
=
add_reglocator_entry
(
hdb
,
str
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
/* HKLM, msidbLocatorTypeDirectory, no signature, file does not exist */
str
=
"'NewSignature28', 2, 'Software
\\
Wine', 'Value10', 0"
;
r
=
add_reglocator_entry
(
hdb
,
str
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
r
=
create_signature_table
(
hdb
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
...
...
@@ -6473,6 +6514,15 @@ static void test_appsearch_reglocator(void)
r
=
add_signature_entry
(
hdb
,
str
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ptr
=
strrchr
(
CURR_DIR
,
'\\'
)
+
1
;
sprintf
(
path
,
"'NewSignature26', '%s', '', '', '', '', '', '', ''"
,
ptr
);
r
=
add_signature_entry
(
hdb
,
path
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
str
=
"'NewSignature27', 'FileName2', '', '', '', '', '', '', ''"
;
r
=
add_signature_entry
(
hdb
,
str
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
hpkg
=
package_from_db
(
hdb
);
ok
(
hpkg
,
"Expected a valid package handle
\n
"
);
...
...
@@ -6616,6 +6666,41 @@ static void test_appsearch_reglocator(void)
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
prop
,
path
),
"Expected
\"
%s
\"
, got
\"
%s
\"\n
"
,
path
,
prop
);
size
=
MAX_PATH
;
lstrcpyA
(
path
,
CURR_DIR
);
ptr
=
strrchr
(
path
,
'\\'
)
+
1
;
*
ptr
=
'\0'
;
r
=
MsiGetPropertyA
(
hpkg
,
"SIGPROP24"
,
prop
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
todo_wine
{
ok
(
!
lstrcmpA
(
prop
,
path
),
"Expected
\"
%s
\"
, got
\"
%s
\"\n
"
,
path
,
prop
);
}
size
=
MAX_PATH
;
sprintf
(
path
,
"%s
\\
"
,
CURR_DIR
);
r
=
MsiGetPropertyA
(
hpkg
,
"SIGPROP25"
,
prop
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
todo_wine
{
ok
(
!
lstrcmpA
(
prop
,
path
),
"Expected
\"
%s
\"
, got
\"
%s
\"\n
"
,
path
,
prop
);
}
size
=
MAX_PATH
;
r
=
MsiGetPropertyA
(
hpkg
,
"SIGPROP26"
,
prop
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
prop
,
""
),
"Expected
\"\"
, got
\"
%s
\"\n
"
,
prop
);
size
=
MAX_PATH
;
r
=
MsiGetPropertyA
(
hpkg
,
"SIGPROP27"
,
prop
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
prop
,
""
),
"Expected
\"\"
, got
\"
%s
\"\n
"
,
prop
);
size
=
MAX_PATH
;
r
=
MsiGetPropertyA
(
hpkg
,
"SIGPROP28"
,
prop
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
!
lstrcmpA
(
prop
,
""
),
"Expected
\"\"
, got
\"
%s
\"\n
"
,
prop
);
RegSetValueA
(
hklm
,
NULL
,
REG_SZ
,
""
,
0
);
RegDeleteValueA
(
hklm
,
"Value1"
);
RegDeleteValueA
(
hklm
,
"Value2"
);
...
...
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