Hans Leidekker : msi/tests: Add tests for msidbFeatureAttributesUIDisallowAbsent.
Alexandre Julliard
julliard at winehq.org
Fri Oct 22 12:30:45 CDT 2010
Module: wine
Branch: master
Commit: 5a0a53820a051f9d89042e38492feaea20097c9c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5a0a53820a051f9d89042e38492feaea20097c9c
Author: Hans Leidekker <hans at codeweavers.com>
Date: Fri Oct 22 10:36:09 2010 +0200
msi/tests: Add tests for msidbFeatureAttributesUIDisallowAbsent.
---
dlls/msi/tests/package.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c
index 765cd24..d19a10a 100644
--- a/dlls/msi/tests/package.c
+++ b/dlls/msi/tests/package.c
@@ -9524,6 +9524,10 @@ static void test_featureparents(void)
r = add_feature_entry( hdb, "'orion', '', '', '', 2, 1, '', 0" );
ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r );
+ /* msidbFeatureAttributesUIDisallowAbsent */
+ r = add_feature_entry( hdb, "'lyra', '', '', '', 2, 1, '', 16" );
+ ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r );
+
/* disabled because of install level */
r = add_feature_entry( hdb, "'waters', '', '', '', 15, 101, '', 9" );
ok( r == ERROR_SUCCESS, "cannot add feature: %d\n", r );
@@ -9704,6 +9708,13 @@ static void test_featureparents(void)
state = 0xdeadbee;
action = 0xdeadbee;
+ r = MsiGetFeatureState(hpkg, "lyra", &state, &action);
+ ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
+ ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
+ todo_wine ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action);
+
+ state = 0xdeadbee;
+ action = 0xdeadbee;
r = MsiGetFeatureState(hpkg, "waters", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
@@ -9796,6 +9807,9 @@ static void test_featureparents(void)
r = MsiSetFeatureState(hpkg, "orion", INSTALLSTATE_ABSENT);
ok( r == ERROR_SUCCESS, "failed to set feature state: %d\n", r);
+ r = MsiSetFeatureState(hpkg, "lyra", INSTALLSTATE_ABSENT);
+ ok( r == ERROR_SUCCESS, "failed to set feature state: %d\n", r);
+
r = MsiSetFeatureState(hpkg, "nosuchfeature", INSTALLSTATE_ABSENT);
ok( r == ERROR_UNKNOWN_FEATURE, "Expected ERROR_UNKNOWN_FEATURE, got %u\n", r);
@@ -9822,6 +9836,13 @@ static void test_featureparents(void)
state = 0xdeadbee;
action = 0xdeadbee;
+ r = MsiGetFeatureState(hpkg, "lyra", &state, &action);
+ ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
+ ok( state == INSTALLSTATE_ABSENT, "Expected lyra INSTALLSTATE_ABSENT, got %d\n", state);
+ todo_wine ok( action == INSTALLSTATE_ABSENT, "Expected lyra INSTALLSTATE_ABSENT, got %d\n", action);
+
+ state = 0xdeadbee;
+ action = 0xdeadbee;
r = MsiGetComponentState(hpkg, "leo", &state, &action);
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
ok( state == INSTALLSTATE_UNKNOWN, "Expected leo INSTALLSTATE_UNKNOWN, got %d\n", state);
More information about the wine-cvs
mailing list