Skip to content

Commit a2e8689

Browse files
winesynclearn-more
authored andcommitted
[WINESYNC] msi/tests: Test deferral of WriteRegistryValues.
Signed-off-by: Zebediah Figura <[email protected]> Signed-off-by: Hans Leidekker <[email protected]> Signed-off-by: Alexandre Julliard <[email protected]> wine commit id ed2861c28cdfd2bb97abb7d376f9aa2d975ea97d by Zebediah Figura <[email protected]>
1 parent 158d754 commit a2e8689

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

modules/rostests/winetests/msi/action.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,12 +698,25 @@ static const char wrv_install_exec_seq_dat[] =
698698
"InstallInitialize\t\t1500\n"
699699
"ProcessComponents\t\t1600\n"
700700
"RemoveRegistryValues\t\t4900\n"
701+
"rrv_immediate\tREMOVE\t4901\n"
702+
"rrv_deferred\tREMOVE\t4902\n"
701703
"WriteRegistryValues\t\t5000\n"
704+
"wrv_immediate\tNOT REMOVE\t5001\n"
705+
"wrv_deferred\tNOT REMOVE\t5002\n"
702706
"RegisterProduct\t\t6100\n"
703707
"PublishFeatures\t\t6200\n"
704708
"PublishProduct\t\t6300\n"
705709
"InstallFinalize\t\t6600\n";
706710

711+
static const char wrv_custom_action_dat[] =
712+
"Action\tType\tSource\tTarget\n"
713+
"s72\ti2\tS64\tS0\n"
714+
"CustomAction\tAction\n"
715+
"wrv_immediate\t1\tcustom.dll\twrv_absent\n"
716+
"wrv_deferred\t1025\tcustom.dll\twrv_present\n"
717+
"rrv_immediate\t1\tcustom.dll\twrv_present\n"
718+
"rrv_deferred\t1025\tcustom.dll\twrv_absent\n";
719+
707720
static const char cf_directory_dat[] =
708721
"Directory\tDirectory_Parent\tDefaultDir\n"
709722
"s72\tS72\tl255\n"
@@ -2028,6 +2041,7 @@ static const msi_table wrv_tables[] =
20282041
ADD_TABLE(wrv_feature),
20292042
ADD_TABLE(wrv_feature_comp),
20302043
ADD_TABLE(wrv_install_exec_seq),
2044+
ADD_TABLE(wrv_custom_action),
20312045
ADD_TABLE(property),
20322046
ADD_TABLE(media),
20332047
ADD_TABLE(wrv_registry),

modules/rostests/winetests/msi/custom.c

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1922,3 +1922,31 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
19221922

19231923
return ERROR_SUCCESS;
19241924
}
1925+
1926+
UINT WINAPI wrv_present(MSIHANDLE hinst)
1927+
{
1928+
HKEY key;
1929+
LONG res;
1930+
1931+
res = RegOpenKeyA(HKEY_CURRENT_USER, "msitest", &key);
1932+
ok(hinst, !res, "got %u\n", res);
1933+
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
1934+
check_reg_str(hinst, key, "sz", "string");
1935+
RegCloseKey(key);
1936+
1937+
return ERROR_SUCCESS;
1938+
}
1939+
1940+
UINT WINAPI wrv_absent(MSIHANDLE hinst)
1941+
{
1942+
HKEY key;
1943+
LONG res;
1944+
1945+
res = RegOpenKeyA(HKEY_CURRENT_USER, "msitest", &key);
1946+
ok(hinst, !res, "got %u\n", res);
1947+
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
1948+
check_reg_str(hinst, key, "sz", NULL);
1949+
RegCloseKey(key);
1950+
1951+
return ERROR_SUCCESS;
1952+
}

modules/rostests/winetests/msi/custom.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,5 @@
5353
@ stdcall sss_stopped(long)
5454
@ stdcall tl_present(long)
5555
@ stdcall tl_absent(long)
56+
@ stdcall wrv_present(long)
57+
@ stdcall wrv_absent(long)

0 commit comments

Comments
 (0)