From f9f2e91198a456240af839930a24226e6358b94e Mon Sep 17 00:00:00 2001 From: Ge van Geldorp Date: Sun, 11 Jan 2009 00:27:50 +0100 Subject: [PATCH] msi/tests: Opening package with relative filename sometimes succeeds on Windows. --- dlls/msi/tests/msi.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c index 3396f5c5bd4..a52e011549c 100644 --- a/dlls/msi/tests/msi.c +++ b/dlls/msi/tests/msi.c @@ -1760,7 +1760,6 @@ static void test_MsiGetComponentPath(void) RegDeleteKeyA(compkey, ""); RegCloseKey(prodkey); RegCloseKey(compkey); - RegCloseKey(installprop); DeleteFileA("C:\\imapath"); lstrcpyA(keypath, "Software\\Classes\\Installer\\Products\\"); @@ -1923,9 +1922,6 @@ static void test_MsiGetProductCode(void) RegDeleteKeyA(prodkey, ""); RegCloseKey(prodkey); - RegDeleteKeyA(prodkey, ""); - RegCloseKey(prodkey); - lstrcpyA(keypath, "Software\\Microsoft\\Installer\\Products\\"); lstrcatA(keypath, prod_squashed); @@ -7368,9 +7364,12 @@ static void test_MsiOpenProduct(void) /* LocalPackage has just the package name */ hprod = 0xdeadbeef; r = MsiOpenProductA(prodcode, &hprod); - ok(r == ERROR_INSTALL_PACKAGE_OPEN_FAILED, - "Expected ERROR_INSTALL_PACKAGE_OPEN_FAILED, got %d\n", r); - ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n"); + ok(r == ERROR_INSTALL_PACKAGE_OPEN_FAILED || r == ERROR_SUCCESS, + "Expected ERROR_INSTALL_PACKAGE_OPEN_FAILED or ERROR_SUCCESS, got %d\n", r); + if (r == ERROR_SUCCESS) + MsiCloseHandle(hprod); + else + ok(hprod == 0xdeadbeef, "Expected hprod to be unchanged\n"); lstrcpyA(val, path); lstrcatA(val, "\\winetest.msi");