msi/tests: Test deferral of RegisterFonts and UnregisterFonts.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
884d146b32
commit
a364e1a9c8
|
@ -799,13 +799,26 @@ static const char font_install_exec_seq_dat[] =
|
|||
"RemoveFiles\t\t3500\n"
|
||||
"InstallFiles\t\t4000\n"
|
||||
"RegisterFonts\t\t4100\n"
|
||||
"rf_immediate\tNOT REMOVE\t4101\n"
|
||||
"rf_deferred\tNOT REMOVE\t4102\n"
|
||||
"UnregisterFonts\t\t4200\n"
|
||||
"uf_immediate\tREMOVE\t4201\n"
|
||||
"uf_deferred\tREMOVE\t4202\n"
|
||||
"RegisterUser\t\t6000\n"
|
||||
"RegisterProduct\t\t6100\n"
|
||||
"PublishFeatures\t\t6300\n"
|
||||
"PublishProduct\t\t6400\n"
|
||||
"InstallFinalize\t\t6600";
|
||||
|
||||
static const char font_custom_action_dat[] =
|
||||
"Action\tType\tSource\tTarget\n"
|
||||
"s72\ti2\tS64\tS0\n"
|
||||
"CustomAction\tAction\n"
|
||||
"rf_immediate\t1\tcustom.dll\tfont_absent\n"
|
||||
"rf_deferred\t1025\tcustom.dll\tfont_present\n"
|
||||
"uf_immediate\t1\tcustom.dll\tfont_present\n"
|
||||
"uf_deferred\t1025\tcustom.dll\tfont_absent\n";
|
||||
|
||||
static const char vp_property_dat[] =
|
||||
"Property\tValue\n"
|
||||
"s72\tl0\n"
|
||||
|
@ -2054,6 +2067,7 @@ static const msi_table font_tables[] =
|
|||
ADD_TABLE(font_file),
|
||||
ADD_TABLE(font),
|
||||
ADD_TABLE(font_install_exec_seq),
|
||||
ADD_TABLE(font_custom_action),
|
||||
ADD_TABLE(font_media),
|
||||
ADD_TABLE(property)
|
||||
};
|
||||
|
|
|
@ -1642,3 +1642,35 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
|
|||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
static const char font_key[] = "Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts";
|
||||
|
||||
UINT WINAPI font_present(MSIHANDLE hinst)
|
||||
{
|
||||
HKEY key;
|
||||
LONG res;
|
||||
|
||||
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, font_key, 0, KEY_QUERY_VALUE | KEY_WOW64_64KEY, &key);
|
||||
ok(hinst, !res, "got %u\n", res);
|
||||
res = RegQueryValueExA(key, "msi test font", NULL, NULL, NULL, NULL);
|
||||
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
|
||||
ok(hinst, !res, "got %u\n", res);
|
||||
RegCloseKey(key);
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
UINT WINAPI font_absent(MSIHANDLE hinst)
|
||||
{
|
||||
HKEY key;
|
||||
LONG res;
|
||||
|
||||
res = RegOpenKeyExA(HKEY_LOCAL_MACHINE, font_key, 0, KEY_QUERY_VALUE | KEY_WOW64_64KEY, &key);
|
||||
ok(hinst, !res, "got %u\n", res);
|
||||
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
|
||||
check_reg_str(hinst, key, "msi test font", NULL);
|
||||
}
|
||||
RegCloseKey(key);
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
@ stdcall crs_absent(long)
|
||||
@ stdcall file_present(long)
|
||||
@ stdcall file_absent(long)
|
||||
@ stdcall font_present(long)
|
||||
@ stdcall font_absent(long)
|
||||
@ stdcall mov_present(long)
|
||||
@ stdcall mov_absent(long)
|
||||
@ stdcall odbc_present(long)
|
||||
|
|
Loading…
Reference in New Issue