msi [2/2]: Test the order in which cab files are handled in the Media table

James Hawkins truiken at gmail.com
Thu Oct 26 19:16:05 CDT 2006


Hi,

These tests show that we're handling the Media table incorrectly.
Fixing this is the first step to get HL2 installing (bug 4533).

Changelog:
* Test the order in which cab files are handled in the Media table.

 dlls/msi/tests/install.c |   48 ++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 48 insertions(+), 0 deletions(-)

-- 
James Hawkins
-------------- next part --------------
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index 760e81e..27adb4b 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/install.c
@@ -823,6 +823,54 @@ static void test_continuouscabs(void)
     DeleteFile(msifile);
 }
 
+static void test_caborder(void)
+{
+    UINT r;
+
+    create_file("imperator", 100);
+    create_file("maximus", 500);
+    create_file("augustus", 50000);
+
+    create_database(msifile, cc_tables, sizeof(cc_tables) / sizeof(msi_table));
+
+    MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL);
+
+    create_cab_file("test1.cab", MEDIA_SIZE, "maximus\0");
+    create_cab_file("test2.cab", MEDIA_SIZE, "augustus\0");
+
+    r = MsiInstallProductA(msifile, NULL);
+    todo_wine
+    {
+        ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r);
+        ok(!delete_pf("msitest\\augustus", TRUE), "File is installed\n");
+        ok(!delete_pf("msitest", FALSE), "File is installed\n");
+    }
+    ok(!delete_pf("msitest\\maximus", TRUE), "File is installed\n");
+
+    DeleteFile("test1.cab");
+    DeleteFile("test2.cab");
+
+    create_cab_file("test1.cab", MEDIA_SIZE, "imperator\0");
+    create_cab_file("test2.cab", MEDIA_SIZE, "maximus\0augustus\0");
+
+    r = MsiInstallProductA(msifile, NULL);
+    todo_wine
+    {
+        ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r);
+        ok(!delete_pf("msitest\\maximus", TRUE), "File is installed\n");
+        ok(!delete_pf("msitest\\augustus", TRUE), "File is installed\n");
+        ok(!delete_pf("msitest", FALSE), "File is installed\n");
+    }
+
+    DeleteFile("test1.cab");
+    DeleteFile("test2.cab");
+
+    DeleteFile("imperator");
+    DeleteFile("maximus");
+    DeleteFile("augustus");
+    DeleteFile(msifile);
+}
+
 START_TEST(install)
 {
     DWORD len;
@@ -839,4 +887,5 @@ START_TEST(install)
     test_MsiSetComponentState();
     test_packagecoltypes();
     test_continuouscabs();
+    test_caborder();
 }
-- 
1.4.2.1


More information about the wine-patches mailing list