James Hawkins : msi: Test the order in which cab files are handled in the Media table.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Oct 27 05:49:24 CDT 2006


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

Author: James Hawkins <truiken at gmail.com>
Date:   Thu Oct 26 17:16:05 2006 -0700

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

---

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

diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index 760e81e..70edf11 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();
 }




More information about the wine-cvs mailing list