From fa22986ace3b250429448e621bc3a37d22b1cf6c Mon Sep 17 00:00:00 2001 From: Fabian Maurer Date: Sun, 3 Nov 2024 11:08:03 +0100 Subject: [PATCH] msi/tests: Add test for MsiOpenDatabaseA during MsiInstallProductA --- dlls/msi/tests/custom.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index 8c5e7e4bbd0..3a3154da7da 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -1259,6 +1259,23 @@ static void test_view_get_error(MSIHANDLE hinst) MsiCloseHandle(db); } +static void test_open_msi(MSIHANDLE hinst) +{ + MSIHANDLE handle = 0; + UINT result; + char buffer[300]; + DWORD len = sizeof(buffer); + + result = MsiGetPropertyA(hinst, "DATABASE", buffer, &len); + ok(hinst, result == 0, "Failed: %x\n", result); + + result = MsiOpenDatabaseA(buffer, (LPCSTR)MSIDBOPEN_READONLY, &handle); + todo_wine + ok (hinst, result == 0, "Got %u\n", result); + + MsiCloseHandle(handle); +} + /* Main test. Anything that doesn't depend on a specific install configuration * or have undesired side effects should go here. */ UINT WINAPI main_test(MSIHANDLE hinst) @@ -1287,6 +1304,7 @@ UINT WINAPI main_test(MSIHANDLE hinst) test_costs(hinst); test_invalid_functions(hinst); test_view_get_error(hinst); + test_open_msi(hinst); return ERROR_SUCCESS; }