Skip to content

Commit 51f5b07

Browse files
winesynclearn-more
authored andcommitted
[WINESYNC] msi/tests: Test deferral of MoveFiles.
Signed-off-by: Zebediah Figura <[email protected]> Signed-off-by: Hans Leidekker <[email protected]> Signed-off-by: Alexandre Julliard <[email protected]> wine commit id af737f9c2f78c448b914570005d34d61d95e7b83 by Zebediah Figura <[email protected]>
1 parent a06d5f3 commit 51f5b07

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

modules/rostests/winetests/msi/action.c

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,29 @@ static const char mov_move_file_dat[] =
526526
"wildcardnodest\taugustus\tbudd*\t\tSourceDir\tMSITESTDIR\t1\n"
527527
"singlenodest\taugustus\tb?r\t\tSourceDir\tMSITESTDIR\t1\n";
528528

529+
static const char mov_install_exec_seq_dat[] =
530+
"Action\tCondition\tSequence\n"
531+
"s72\tS255\tI2\n"
532+
"InstallExecuteSequence\tAction\n"
533+
"CostInitialize\t\t100\n"
534+
"FileCost\t\t200\n"
535+
"ResolveSource\t\t300\n"
536+
"CostFinalize\t\t400\n"
537+
"InstallValidate\t\t500\n"
538+
"InstallInitialize\t\t600\n"
539+
"MoveFiles\t\t700\n"
540+
"mov_immediate\t\t701\n"
541+
"mov_deferred\t\t702\n"
542+
"InstallFiles\t\t800\n"
543+
"InstallFinalize\t\t900\n";
544+
545+
static const char mov_custom_action_dat[] =
546+
"Action\tType\tSource\tTarget\n"
547+
"s72\ti2\tS64\tS0\n"
548+
"CustomAction\tAction\n"
549+
"mov_immediate\t1\tcustom.dll\tmov_absent\n"
550+
"mov_deferred\t1025\tcustom.dll\tmov_present\n";
551+
529552
static const char df_directory_dat[] =
530553
"Directory\tDirectory_Parent\tDefaultDir\n"
531554
"s72\tS72\tl255\n"
@@ -1843,7 +1866,8 @@ static const msi_table mov_tables[] =
18431866
ADD_TABLE(rof_feature),
18441867
ADD_TABLE(ci2_feature_comp),
18451868
ADD_TABLE(ci2_file),
1846-
ADD_TABLE(install_exec_seq),
1869+
ADD_TABLE(mov_install_exec_seq),
1870+
ADD_TABLE(mov_custom_action),
18471871
ADD_TABLE(rof_media),
18481872
ADD_TABLE(property),
18491873
ADD_TABLE(mov_move_file),

modules/rostests/winetests/msi/custom.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,3 +1363,19 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) {
13631363
}
13641364
return ERROR_SUCCESS;
13651365
}
1366+
1367+
UINT WINAPI mov_present(MSIHANDLE hinst)
1368+
{
1369+
ok(hinst, pf_exists("msitest\\canada"), "file absent\n");
1370+
ok(hinst, pf_exists("msitest\\dominica"), "file absent\n");
1371+
return ERROR_SUCCESS;
1372+
}
1373+
1374+
UINT WINAPI mov_absent(MSIHANDLE hinst)
1375+
{
1376+
todo_wine {
1377+
ok(hinst, !pf_exists("msitest\\canada"), "file present\n");
1378+
ok(hinst, !pf_exists("msitest\\dominica"), "file present\n");
1379+
}
1380+
return ERROR_SUCCESS;
1381+
}

modules/rostests/winetests/msi/custom.spec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
@ stdcall crs_absent(long)
1010
@ stdcall file_present(long)
1111
@ stdcall file_absent(long)
12+
@ stdcall mov_present(long)
13+
@ stdcall mov_absent(long)
1214
@ stdcall odbc_present(long)
1315
@ stdcall odbc_absent(long)
1416
@ stdcall rd_present(long)

0 commit comments

Comments
 (0)