Zebediah Figura : msi/tests: Test deferral of PublishProduct.
Alexandre Julliard
julliard at winehq.org
Fri May 25 13:41:12 CDT 2018
Module: wine
Branch: master
Commit: 4f2bb46fd1b7e190946b288312b2be30a68c02c1
URL: https://source.winehq.org/git/wine.git/?a=commit;h=4f2bb46fd1b7e190946b288312b2be30a68c02c1
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Thu May 24 19:14:14 2018 -0500
msi/tests: Test deferral of PublishProduct.
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msi/tests/action.c | 4 ++++
dlls/msi/tests/custom.c | 29 +++++++++++++++++++++++++++++
dlls/msi/tests/custom.spec | 2 ++
3 files changed, 35 insertions(+)
diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c
index 82ec376..3d74704 100644
--- a/dlls/msi/tests/action.c
+++ b/dlls/msi/tests/action.c
@@ -409,6 +409,8 @@ static const char pp_install_exec_seq_dat[] =
"pf_immediate\tPUBLISH_FEATURES AND ALLUSERS\t6301\n"
"pf_deferred\tPUBLISH_FEATURES AND ALLUSERS\t6302\n"
"PublishProduct\tPUBLISH_PRODUCT=1 Or FULL=1\t6400\n"
+ "pp_immediate\tPUBLISH_PRODUCT AND ALLUSERS\t6401\n"
+ "pp_deferred\tPUBLISH_PRODUCT AND ALLUSERS\t6402\n"
"InstallFinalize\t\t6600";
static const char pp_custom_action_dat[] =
@@ -419,6 +421,8 @@ static const char pp_custom_action_dat[] =
"pf_deferred\t1025\tcustom.dll\tpf_present\n"
"uf_immediate\t1\tcustom.dll\tpf_present\n"
"uf_deferred\t1025\tcustom.dll\tpf_absent\n"
+ "pp_immediate\t1\tcustom.dll\tpp_absent\n"
+ "pp_deferred\t1025\tcustom.dll\tpp_present\n"
"ppc_immediate\t1\tcustom.dll\tppc_absent\n"
"ppc_deferred\t1025\tcustom.dll\tppc_present\n";
diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c
index bac2653..cfb368f 100644
--- a/dlls/msi/tests/custom.c
+++ b/dlls/msi/tests/custom.c
@@ -1536,3 +1536,32 @@ todo_wine_if(!MsiGetMode(hinst, MSIRUNMODE_SCHEDULED))
return ERROR_SUCCESS;
}
+
+static const char pp_prodkey[] = "Installer\\Products\\84A88FD7F6998CE40A22FB59F6B9C2BB";
+
+UINT WINAPI pp_present(MSIHANDLE hinst)
+{
+ HKEY key;
+ LONG res;
+
+ res = RegOpenKeyExA(HKEY_CLASSES_ROOT, pp_prodkey, 0, KEY_READ | KEY_WOW64_64KEY, &key);
+ ok(hinst, !res, "got %u\n", res);
+ check_reg_str(hinst, key, "ProductName", "MSITEST");
+ check_reg_str(hinst, key, "PackageCode", "AC75740029052C94DA02821EECD05F2F");
+ check_reg_str(hinst, key, "Clients", ":");
+
+ RegCloseKey(key);
+ return ERROR_SUCCESS;
+}
+
+UINT WINAPI pp_absent(MSIHANDLE hinst)
+{
+ HKEY key;
+ LONG res;
+
+ res = RegOpenKeyExA(HKEY_CLASSES_ROOT, pp_prodkey, 0, KEY_READ | KEY_WOW64_64KEY, &key);
+todo_wine
+ ok(hinst, res == ERROR_FILE_NOT_FOUND, "got %u\n", res);
+
+ return ERROR_SUCCESS;
+}
diff --git a/dlls/msi/tests/custom.spec b/dlls/msi/tests/custom.spec
index 2092570..d8b5f08 100644
--- a/dlls/msi/tests/custom.spec
+++ b/dlls/msi/tests/custom.spec
@@ -17,6 +17,8 @@
@ stdcall pa_absent(long)
@ stdcall pf_present(long)
@ stdcall pf_absent(long)
+@ stdcall pp_present(long)
+@ stdcall pp_absent(long)
@ stdcall ppc_present(long)
@ stdcall ppc_absent(long)
@ stdcall pub_present(long)
More information about the wine-cvs
mailing list