msi/tests: Fix MsiApplyMultiplePatches tests on Windows.

Nicolas Le Cam niko.lecam at gmail.com
Fri May 1 16:46:27 CDT 2009


---
 dlls/msi/tests/package.c |   46 +++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 39 insertions(+), 7 deletions(-)

diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c
index 35a22de..3762c7a 100644
--- a/dlls/msi/tests/package.c
+++ b/dlls/msi/tests/package.c
@@ -7267,7 +7267,7 @@ static void test_removefiles(void)
     ok( r == ERROR_SUCCESS, "remove files failed\n");
 
     ok(DeleteFileA("hydrogen.txt"), "Expected hydrogen.txt to exist\n");
-    ok(DeleteFileA("lithium.txt"), "Expected lithium.txt to exist\n");    
+    ok(DeleteFileA("lithium.txt"), "Expected lithium.txt to exist\n");
     ok(DeleteFileA("beryllium.txt"), "Expected beryllium.txt to exist\n");
     ok(DeleteFileA("carbon.txt"), "Expected carbon.txt to exist\n");
     ok(DeleteFileA("helium.txt"), "Expected helium.txt to exist\n");
@@ -9231,7 +9231,7 @@ static void test_featureparents(void)
     ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
     ok( state == INSTALLSTATE_UNKNOWN, "Expected hydrus INSTALLSTATE_UNKNOWN, got %d\n", state);
     ok( action == INSTALLSTATE_UNKNOWN, "Expected hydrus INSTALLSTATE_UNKNOWN, got %d\n", action);
-    
+
     MsiCloseHandle(hpkg);
     DeleteFileA(msifile);
 }
@@ -11535,7 +11535,7 @@ static void test_MsiSetProperty(void)
 
 static void test_MsiApplyMultiplePatches(void)
 {
-    UINT r;
+    UINT r, type = GetDriveType(NULL);
 
     r = MsiApplyMultiplePatchesA(NULL, NULL, NULL);
     ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %u\n", r);
@@ -11544,19 +11544,51 @@ static void test_MsiApplyMultiplePatches(void)
     ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %u\n", r);
 
     r = MsiApplyMultiplePatchesA(";", NULL, NULL);
-    ok(r == ERROR_INVALID_NAME, "Expected ERROR_INVALID_NAME, got %u\n", r);
+    todo_wine
+    {
+        if (type == DRIVE_FIXED)
+            ok(r == ERROR_PATH_NOT_FOUND,
+               "Expected ERROR_PATH_NOT_FOUND, got %u\n", r);
+        else
+            ok(r == ERROR_INVALID_NAME,
+               "Expected ERROR_INVALID_NAME, got %u\n", r);
+    }
 
     r = MsiApplyMultiplePatchesA("  ;", NULL, NULL);
-    ok(r == ERROR_INVALID_NAME, "Expected ERROR_INVALID_NAME, got %u\n", r);
+    todo_wine
+    {
+        if (type == DRIVE_FIXED)
+            ok(r == ERROR_PATCH_PACKAGE_OPEN_FAILED,
+               "Expected ERROR_PATCH_PACKAGE_OPEN_FAILED, got %u\n", r);
+        else
+            ok(r == ERROR_INVALID_NAME,
+               "Expected ERROR_INVALID_NAME, got %u\n", r);
+    }
 
     r = MsiApplyMultiplePatchesA(";;", NULL, NULL);
-    ok(r == ERROR_INVALID_NAME, "Expected ERROR_INVALID_NAME, got %u\n", r);
+    todo_wine
+    {
+        if (type == DRIVE_FIXED)
+            ok(r == ERROR_PATH_NOT_FOUND,
+               "Expected ERROR_PATH_NOT_FOUND, got %u\n", r);
+        else
+            ok(r == ERROR_INVALID_NAME,
+               "Expected ERROR_INVALID_NAME, got %u\n", r);
+    }
 
     r = MsiApplyMultiplePatchesA("nosuchpatchpackage;", NULL, NULL);
     todo_wine ok(r == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %u\n", r);
 
     r = MsiApplyMultiplePatchesA(";nosuchpatchpackage", NULL, NULL);
-    ok(r == ERROR_INVALID_NAME, "Expected ERROR_INVALID_NAME, got %u\n", r);
+    todo_wine
+    {
+        if (type == DRIVE_FIXED)
+            ok(r == ERROR_PATH_NOT_FOUND,
+               "Expected ERROR_PATH_NOT_FOUND, got %u\n", r);
+        else
+            ok(r == ERROR_INVALID_NAME,
+               "Expected ERROR_INVALID_NAME, got %u\n", r);
+    }
 
     r = MsiApplyMultiplePatchesA("nosuchpatchpackage;nosuchpatchpackage", NULL, NULL);
     todo_wine ok(r == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %u\n", r);
-- 
1.6.0.4


--=-00nyv8P9fouzv94n/LQi--




More information about the wine-patches mailing list