Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msi/tests/action.c | 14 ++++++++++++++ dlls/msi/tests/custom.c | 32 ++++++++++++++++++++++++++++++++ dlls/msi/tests/custom.spec | 2 ++ 3 files changed, 48 insertions(+)
diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c index 5747c935..0f7fb6c 100644 --- a/dlls/msi/tests/action.c +++ b/dlls/msi/tests/action.c @@ -196,12 +196,25 @@ static const char env_install_exec_seq_dat[] = "InstallInitialize\t\t500\n" "ProcessComponents\t\t600\n" "WriteEnvironmentStrings\t\t700\n" + "wes_immediate\tNOT REMOVE\t701\n" + "wes_deferred\tNOT REMOVE\t702\n" "RemoveEnvironmentStrings\t\t800\n" + "res_immediate\tREMOVE\t801\n" + "res_deferred\tREMOVE\t802\n" "RegisterProduct\t\t900\n" "PublishFeatures\t\t1000\n" "PublishProduct\t\t1100\n" "InstallFinalize\t\t1200\n";
+static const char env_custom_action_dat[] = + "Action\tType\tSource\tTarget\n" + "s72\ti2\tS64\tS0\n" + "CustomAction\tAction\n" + "wes_immediate\t1\tcustom.dll\tenv_absent\n" + "wes_deferred\t1025\tcustom.dll\tenv_present\n" + "res_immediate\t1\tcustom.dll\tenv_present\n" + "res_deferred\t1025\tcustom.dll\tenv_absent\n"; + static const char env_environment_dat[] = "Environment\tName\tValue\tComponent_\n" "s72\tl255\tL255\ts72\n" @@ -1950,6 +1963,7 @@ static const msi_table env_tables[] = ADD_TABLE(feature_comp), ADD_TABLE(file), ADD_TABLE(env_install_exec_seq), + ADD_TABLE(env_custom_action), ADD_TABLE(media), ADD_TABLE(property), ADD_TABLE(env_environment) diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index 3fb5382..b182304 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -1858,3 +1858,35 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
return ERROR_SUCCESS; } + +UINT WINAPI env_present(MSIHANDLE hinst) +{ + HKEY key; + LONG res; + + res = RegOpenKeyA(HKEY_CURRENT_USER, "Environment", &key); + ok(hinst, !res, "got %u\n", res); +todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) { + check_reg_str(hinst, key, "MSITESTVAR3", "1"); + check_reg_str(hinst, key, "MSITESTVAR4", "1"); +} + RegCloseKey(key); + + return ERROR_SUCCESS; +} + +UINT WINAPI env_absent(MSIHANDLE hinst) +{ + HKEY key; + LONG res; + + res = RegOpenKeyA(HKEY_CURRENT_USER, "Environment", &key); + ok(hinst, !res, "got %u\n", res); +todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED)) { + check_reg_str(hinst, key, "MSITESTVAR3", NULL); + check_reg_str(hinst, key, "MSITESTVAR4", NULL); +} + RegCloseKey(key); + + return ERROR_SUCCESS; +} diff --git a/dlls/msi/tests/custom.spec b/dlls/msi/tests/custom.spec index 2ec5b6c..8b3c2fb 100644 --- a/dlls/msi/tests/custom.spec +++ b/dlls/msi/tests/custom.spec @@ -7,6 +7,8 @@ @ stdcall cf_absent(long) @ stdcall crs_present(long) @ stdcall crs_absent(long) +@ stdcall env_present(long) +@ stdcall env_absent(long) @ stdcall file_present(long) @ stdcall file_absent(long) @ stdcall font_present(long)