Hans Leidekker : msi/tests: Add a test for MsiGetComponentState.

Alexandre Julliard julliard at winehq.org
Mon Jan 10 10:55:18 CST 2011


Module: wine
Branch: master
Commit: f133222d5eae9fbde8c1e6d7bc851602f025c051
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f133222d5eae9fbde8c1e6d7bc851602f025c051

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Mon Jan 10 09:43:48 2011 +0100

msi/tests: Add a test for MsiGetComponentState.

---

 dlls/msi/tests/package.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c
index 7735d71..706e925 100644
--- a/dlls/msi/tests/package.c
+++ b/dlls/msi/tests/package.c
@@ -7829,7 +7829,7 @@ static void test_removefiles(void)
     ok( r == ERROR_SUCCESS, "cost init failed\n");
 
     r = MsiDoAction( hpkg, "FileCost");
-    ok( r == ERROR_SUCCESS, "cost finalize failed\n");
+    ok( r == ERROR_SUCCESS, "file cost failed\n");
 
     installed = action = 0xdeadbeef;
     r = MsiGetComponentState( hpkg, "oxygen", &installed, &action );
@@ -7841,11 +7841,19 @@ static void test_removefiles(void)
     ok( r == ERROR_SUCCESS, "cost finalize failed\n");
 
     r = MsiDoAction( hpkg, "InstallValidate");
-    ok( r == ERROR_SUCCESS, "cost finalize failed\n");
+    ok( r == ERROR_SUCCESS, "install validate failed\n");
 
     r = MsiSetComponentState( hpkg, "hydrogen", INSTALLSTATE_ABSENT );
     ok( r == ERROR_SUCCESS, "failed to set component state: %d\n", r);
 
+    installed = action = 0xdeadbeef;
+    r = MsiGetComponentState( hpkg, "hydrogen", &installed, &action );
+    ok( r == ERROR_SUCCESS, "failed to get component state %u\n", r );
+    todo_wine {
+    ok( installed == INSTALLSTATE_UNKNOWN, "expected INSTALLSTATE_UNKNOWN, got %d\n", installed );
+    ok( action == INSTALLSTATE_UNKNOWN, "expected INSTALLSTATE_UNKNOWN, got %d\n", action );
+    }
+
     r = MsiSetComponentState( hpkg, "helium", INSTALLSTATE_LOCAL );
     ok( r == ERROR_SUCCESS, "failed to set component state: %d\n", r);
 




More information about the wine-cvs mailing list