msi/test: Add tests for MsiGetFeatureState.
authorHans Leidekker <hans@codeweavers.com>
Fri, 24 Sep 2010 15:08:48 +0000 (17:08 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 24 Sep 2010 16:20:36 +0000 (18:20 +0200)
dlls/msi/tests/package.c

index 841ef141969cdd7996bc52c99475a54bb7c054b5..7efb6a291dbef329a6ddfebd5ebd20e020410a74 100644 (file)
@@ -3283,6 +3283,19 @@ static void test_states(void)
     r = MsiDoAction( hpkg, "FileCost");
     ok( r == ERROR_SUCCESS, "file cost failed\n");
 
+    r = MsiGetFeatureState(hpkg, "one", NULL, NULL);
+    ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
+
+    action = 0xdeadbee;
+    r = MsiGetFeatureState(hpkg, "one", NULL, &action);
+    ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
+    ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
+
+    state = 0xdeadbee;
+    r = MsiGetFeatureState( hpkg, "one", &state, NULL);
+    ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
+    ok( state == INSTALLSTATE_UNKNOWN, "Expected INSTALLSTATE_UNKNOWN, got %d\n", state);
+
     state = 0xdeadbee;
     action = 0xdeadbee;
     r = MsiGetFeatureState(hpkg, "one", &state, &action);