Skip to content

Commit 07ea0dc

Browse files
winesynclearn-more
authored andcommitted
[WINESYNC] msi/tests: Test deferral of DuplicateFiles and RemoveDuplicateFiles.
Signed-off-by: Zebediah Figura <[email protected]> Signed-off-by: Hans Leidekker <[email protected]> Signed-off-by: Alexandre Julliard <[email protected]> wine commit id 4d9d73e1b95ced3c66beaeab0e337c4b9eec52d5 by Zebediah Figura <[email protected]>
1 parent c5b7f9f commit 07ea0dc

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

modules/rostests/winetests/msi/action.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,13 +1081,26 @@ static const char rd_install_exec_seq_dat[] =
10811081
"InstallInitialize\t\t1500\n"
10821082
"ProcessComponents\t\t1600\n"
10831083
"RemoveDuplicateFiles\t\t1900\n"
1084+
"rd_immediate\tREMOVE\t1901\n"
1085+
"rd_deferred\tREMOVE\t1902\n"
10841086
"InstallFiles\t\t2000\n"
10851087
"DuplicateFiles\t\t2100\n"
1088+
"df_immediate\tNOT REMOVE\t2101\n"
1089+
"df_deferred\tNOT REMOVE\t2102\n"
10861090
"RegisterProduct\t\t5000\n"
10871091
"PublishFeatures\t\t5100\n"
10881092
"PublishProduct\t\t5200\n"
10891093
"InstallFinalize\t\t6000\n";
10901094

1095+
static const char rd_custom_action_dat[] =
1096+
"Action\tType\tSource\tTarget\n"
1097+
"s72\ti2\tS64\tS0\n"
1098+
"CustomAction\tAction\n"
1099+
"df_immediate\t1\tcustom.dll\trd_absent\n"
1100+
"df_deferred\t1025\tcustom.dll\trd_present\n"
1101+
"rd_immediate\t1\tcustom.dll\trd_present\n"
1102+
"rd_deferred\t1025\tcustom.dll\trd_absent\n";
1103+
10911104
static const char rrv_file_dat[] =
10921105
"File\tComponent_\tFileName\tFileSize\tVersion\tLanguage\tAttributes\tSequence\n"
10931106
"s72\ts72\tl255\ti4\tS72\tS20\tI2\ti2\n"
@@ -1996,6 +2009,7 @@ static const msi_table rd_tables[] =
19962009
ADD_TABLE(rd_file),
19972010
ADD_TABLE(rd_duplicate_file),
19982011
ADD_TABLE(rd_install_exec_seq),
2012+
ADD_TABLE(rd_custom_action),
19992013
ADD_TABLE(media),
20002014
ADD_TABLE(property)
20012015
};

modules/rostests/winetests/msi/custom.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,3 +1274,25 @@ UINT WINAPI sss_stopped(MSIHANDLE hinst)
12741274
CloseServiceHandle(manager);
12751275
return ERROR_SUCCESS;
12761276
}
1277+
1278+
UINT WINAPI rd_present(MSIHANDLE hinst)
1279+
{
1280+
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
1281+
ok(hinst, pf_exists("msitest\\original2.txt"), "file absent\n");
1282+
ok(hinst, pf_exists("msitest\\duplicate.txt"), "file absent\n");
1283+
}
1284+
ok(hinst, !pf_exists("msitest\\original3.txt"), "file present\n");
1285+
ok(hinst, !pf_exists("msitest\\duplicate2.txt"), "file present\n");
1286+
return ERROR_SUCCESS;
1287+
}
1288+
1289+
UINT WINAPI rd_absent(MSIHANDLE hinst)
1290+
{
1291+
todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
1292+
ok(hinst, !pf_exists("msitest\\original2.txt"), "file present\n");
1293+
ok(hinst, !pf_exists("msitest\\duplicate.txt"), "file present\n");
1294+
}
1295+
ok(hinst, !pf_exists("msitest\\original3.txt"), "file present\n");
1296+
ok(hinst, !pf_exists("msitest\\duplicate2.txt"), "file present\n");
1297+
return ERROR_SUCCESS;
1298+
}

modules/rostests/winetests/msi/custom.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
@ stdcall cf_absent(long)
88
@ stdcall crs_present(long)
99
@ stdcall crs_absent(long)
10+
@ stdcall rd_present(long)
11+
@ stdcall rd_absent(long)
1012
@ stdcall sds_present(long)
1113
@ stdcall sds_absent(long)
1214
@ stdcall sis_present(long)

0 commit comments

Comments
 (0)