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

This commit is contained in:
James Hawkins 2006-10-26 17:16:05 -07:00 committed by Alexandre Julliard
parent c6bfbde849
commit 005c0a792e
1 changed files with 49 additions and 0 deletions

View File

@ -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();
}