Skip to content

Commit 366dd26

Browse files
winesynclearn-more
authored andcommitted
[WINESYNC] msi: Add REINSTALLMODE=v installation mode test.
Signed-off-by: Piotr Caban <[email protected]> Signed-off-by: Hans Leidekker <[email protected]> Signed-off-by: Alexandre Julliard <[email protected]> wine commit id cecff8a353652606924f152c26d25ea89a25cb90 by Piotr Caban <[email protected]>
1 parent 74196b8 commit 366dd26

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

modules/rostests/winetests/msi/package.c

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3819,10 +3819,6 @@ static void test_states(void)
38193819

38203820
r = MsiOpenDatabaseA(msifile2, (const char*)MSIDBOPEN_DIRECT, &hdb);
38213821
ok(r == ERROR_SUCCESS, "failed to open database: %d\n", r);
3822-
add_install_execute_sequence_entry( hdb, "'FindRelatedProducts', '', '100'" );
3823-
add_install_execute_sequence_entry( hdb, "'RemoveExistingProducts', '', '1401'" );
3824-
create_upgrade_table( hdb );
3825-
add_upgrade_entry( hdb, "'{3494EEEA-4221-4A66-802E-DED8916BC5C5}', NULL, '1.1.2', NULL, 0, NULL, 'OLDERVERSIONBEINGUPGRADED'");
38263822
update_ProductVersion_property( hdb, "1.1.2" );
38273823
set_summary_str(hdb, PID_REVNUMBER, "{A219A62A-D931-4F1B-89DB-FF1C300A8D43}");
38283824
r = MsiDatabaseCommit(hdb);
@@ -3832,16 +3828,33 @@ static void test_states(void)
38323828
r = MsiInstallProductA(msifile2, "");
38333829
todo_wine ok(r == ERROR_PRODUCT_VERSION, "Expected ERROR_PRODUCT_VERSION, got %d\n", r);
38343830

3831+
r = MsiInstallProductA(msifile2, "REINSTALLMODE=v");
3832+
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3833+
3834+
r = MsiOpenProductA("{7262AC98-EEBD-4364-8CE3-D654F6A425B9}", &hprod);
3835+
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3836+
size = MAX_PATH;
3837+
r = MsiGetProductPropertyA(hprod, "ProductVersion", value, &size);
3838+
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3839+
ok(!strcmp(value, "1.1.2"), "ProductVersion = %s\n", value);
3840+
MsiCloseHandle(hprod);
3841+
38353842
/* major upgrade test */
38363843
r = MsiOpenDatabaseA(msifile2, (const char*)MSIDBOPEN_DIRECT, &hdb);
38373844
ok(r == ERROR_SUCCESS, "failed to open database: %d\n", r);
3845+
add_install_execute_sequence_entry( hdb, "'FindRelatedProducts', '', '100'" );
3846+
add_install_execute_sequence_entry( hdb, "'RemoveExistingProducts', '', '1401'" );
3847+
create_upgrade_table( hdb );
3848+
add_upgrade_entry( hdb, "'{3494EEEA-4221-4A66-802E-DED8916BC5C5}', NULL, '1.1.3', NULL, 0, NULL, 'OLDERVERSIONBEINGUPGRADED'");
38383849
update_ProductCode_property( hdb, "{333DB27A-C25E-4EBC-9BEC-0F49546C19A6}" );
3850+
update_ProductVersion_property( hdb, "1.1.3" );
3851+
set_summary_str(hdb, PID_REVNUMBER, "{5F99011C-02E6-48BD-8B8D-DE7CFABC7A09}");
38393852
r = MsiDatabaseCommit(hdb);
38403853
ok(r == ERROR_SUCCESS, "MsiDatabaseCommit failed: %d\n", r);
38413854
MsiCloseHandle(hdb);
38423855

38433856
r = MsiInstallProductA(msifile2, "");
3844-
ok(r == S_OK, "Expected ERROR_PRODUCT_VERSION, got %d\n", r);
3857+
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
38453858

38463859
r = MsiOpenProductA("{7262AC98-EEBD-4364-8CE3-D654F6A425B9}", &hprod);
38473860
ok(r == ERROR_UNKNOWN_PRODUCT, "Expected ERROR_UNKNOWN_PRODUCT, got %d\n", r);
@@ -3850,7 +3863,7 @@ static void test_states(void)
38503863
size = MAX_PATH;
38513864
r = MsiGetProductPropertyA(hprod, "ProductVersion", value, &size);
38523865
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
3853-
ok(!strcmp(value, "1.1.2"), "ProductVersion = %s\n", value);
3866+
ok(!strcmp(value, "1.1.3"), "ProductVersion = %s\n", value);
38543867
MsiCloseHandle(hprod);
38553868

38563869
/* uninstall the product */

0 commit comments

Comments
 (0)