Skip to content

Commit c6f0b6c

Browse files
winesynclearn-more
authored andcommitted
[WINESYNC] msi/tests: Test deferral of RegisterMimeInfo and UnregisterMimeInfo.
Signed-off-by: Zebediah Figura <[email protected]> Signed-off-by: Hans Leidekker <[email protected]> Signed-off-by: Alexandre Julliard <[email protected]> wine commit id f181e71400eb25a9aa4e1bf6355116269d04c0b7 by Zebediah Figura <[email protected]>
1 parent 13c1677 commit c6f0b6c

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

modules/rostests/winetests/msi/action.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1716,13 +1716,26 @@ static const char rmi_install_exec_seq_dat[] =
17161716
"InstallFiles\t\t2000\n"
17171717
"UnregisterExtensionInfo\t\t3000\n"
17181718
"UnregisterMIMEInfo\t\t3500\n"
1719+
"umi_immediate\tREMOVE\t3501\n"
1720+
"umi_deferred\tREMOVE\t3502\n"
17191721
"RegisterExtensionInfo\t\t4000\n"
17201722
"RegisterMIMEInfo\t\t4500\n"
1723+
"rmi_immediate\tNOT REMOVE\t4501\n"
1724+
"rmi_deferred\tNOT REMOVE\t4502\n"
17211725
"RegisterProduct\t\t5000\n"
17221726
"PublishFeatures\t\t5100\n"
17231727
"PublishProduct\t\t5200\n"
17241728
"InstallFinalize\t\t6000\n";
17251729

1730+
static const char rmi_custom_action_dat[] =
1731+
"Action\tType\tSource\tTarget\n"
1732+
"s72\ti2\tS64\tS0\n"
1733+
"CustomAction\tAction\n"
1734+
"rmi_immediate\t1\tcustom.dll\trmi_absent\n"
1735+
"rmi_deferred\t1025\tcustom.dll\trmi_present\n"
1736+
"umi_immediate\t1\tcustom.dll\trmi_present\n"
1737+
"umi_deferred\t1025\tcustom.dll\trmi_absent\n";
1738+
17261739
static const char pa_file_dat[] =
17271740
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
17281741
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
@@ -2270,6 +2283,7 @@ static const msi_table rmi_tables[] =
22702283
ADD_TABLE(rmi_verb),
22712284
ADD_TABLE(rmi_mime),
22722285
ADD_TABLE(rmi_install_exec_seq),
2286+
ADD_TABLE(rmi_custom_action),
22732287
ADD_TABLE(media),
22742288
ADD_TABLE(property)
22752289
};

modules/rostests/winetests/msi/custom.c

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,3 +1674,27 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
16741674

16751675
return ERROR_SUCCESS;
16761676
}
1677+
1678+
UINT WINAPI rmi_present(MSIHANDLE hinst)
1679+
{
1680+
HKEY key;
1681+
LONG res;
1682+
1683+
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "MIME\\Database\\Content Type\\mime/type", &key);
1684+
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
1685+
ok(hinst, !res, "got %u\n", res);
1686+
1687+
return ERROR_SUCCESS;
1688+
}
1689+
1690+
UINT WINAPI rmi_absent(MSIHANDLE hinst)
1691+
{
1692+
HKEY key;
1693+
LONG res;
1694+
1695+
res = RegOpenKeyA(HKEY_CLASSES_ROOT, "MIME\\Database\\Content Type\\mime/type", &key);
1696+
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
1697+
ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
1698+
1699+
return ERROR_SUCCESS;
1700+
}

modules/rostests/winetests/msi/custom.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
@ stdcall rci_absent(long)
3030
@ stdcall rei_present(long)
3131
@ stdcall rei_absent(long)
32+
@ stdcall rmi_present(long)
33+
@ stdcall rmi_absent(long)
3234
@ stdcall rd_present(long)
3335
@ stdcall rd_absent(long)
3436
@ stdcall sds_present(long)

0 commit comments

Comments
 (0)