Paul Vriens : shlwapi/tests: Fix failures on multiple platforms.
Alexandre Julliard
julliard at winehq.org
Fri Oct 24 08:12:31 CDT 2008
Module: wine
Branch: master
Commit: c5866d369695902fd78833ab4d8e552d9d854678
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c5866d369695902fd78833ab4d8e552d9d854678
Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date: Thu Oct 23 21:41:11 2008 +0200
shlwapi/tests: Fix failures on multiple platforms.
---
dlls/shlwapi/tests/assoc.c | 33 +++++++++++++++++++++++++--------
1 files changed, 25 insertions(+), 8 deletions(-)
diff --git a/dlls/shlwapi/tests/assoc.c b/dlls/shlwapi/tests/assoc.c
index aa01814..872575e 100644
--- a/dlls/shlwapi/tests/assoc.c
+++ b/dlls/shlwapi/tests/assoc.c
@@ -40,29 +40,46 @@ static void test_getstring_bad(void)
hr = AssocQueryStringW(0, ASSOCSTR_EXECUTABLE, NULL, open, NULL, &len);
expect_hr(E_INVALIDARG, hr);
hr = AssocQueryStringW(0, ASSOCSTR_EXECUTABLE, badBad, open, NULL, &len);
- expect_hr(E_FAIL, hr);
+ ok(hr == E_FAIL ||
+ hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION), /* Win9x/WinMe/NT4/W2K/Vista/W2K8 */
+ "Unexpected result : %08x\n", hr);
hr = AssocQueryStringW(0, ASSOCSTR_EXECUTABLE, dotBad, open, NULL, &len);
- expect_hr(E_FAIL, hr);
+ ok(hr == E_FAIL ||
+ hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION), /* Win9x/WinMe/NT4/W2K/Vista/W2K8 */
+ "Unexpected result : %08x\n", hr);
hr = AssocQueryStringW(0, ASSOCSTR_EXECUTABLE, dotHtml, invalid, NULL,
&len);
- expect_hr(0x80070002, hr); /* NOT FOUND */
+ ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) ||
+ hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION), /* Win9x/WinMe/NT4/W2K/Vista/W2K8 */
+ "Unexpected result : %08x\n", hr);
hr = AssocQueryStringW(0, ASSOCSTR_EXECUTABLE, dotHtml, open, NULL, NULL);
- expect_hr(E_UNEXPECTED, hr);
+ ok(hr == E_UNEXPECTED ||
+ hr == E_INVALIDARG, /* Win9x/WinMe/NT4/W2K/Vista/W2K8 */
+ "Unexpected result : %08x\n", hr);
hr = AssocQueryStringW(0, ASSOCSTR_FRIENDLYAPPNAME, NULL, open, NULL, &len);
expect_hr(E_INVALIDARG, hr);
hr = AssocQueryStringW(0, ASSOCSTR_FRIENDLYAPPNAME, badBad, open, NULL,
&len);
- expect_hr(E_FAIL, hr);
+ ok(hr == E_FAIL ||
+ hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION), /* Win9x/WinMe/NT4/W2K/Vista/W2K8 */
+ "Unexpected result : %08x\n", hr);
hr = AssocQueryStringW(0, ASSOCSTR_FRIENDLYAPPNAME, dotBad, open, NULL,
&len);
- expect_hr(E_FAIL, hr);
+ ok(hr == E_FAIL ||
+ hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION), /* Win9x/WinMe/NT4/W2K/Vista/W2K8 */
+ "Unexpected result : %08x\n", hr);
hr = AssocQueryStringW(0, ASSOCSTR_FRIENDLYAPPNAME, dotHtml, invalid, NULL,
&len);
- expect_hr(0x80070002, hr); /* NOT FOUND */
+ ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) ||
+ hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) || /* W2K/Vista/W2K8 */
+ hr == E_FAIL, /* Win9x/WinMe/NT4 */
+ "Unexpected result : %08x\n", hr);
hr = AssocQueryStringW(0, ASSOCSTR_FRIENDLYAPPNAME, dotHtml, open, NULL,
NULL);
- expect_hr(E_UNEXPECTED, hr);
+ ok(hr == E_UNEXPECTED ||
+ hr == E_INVALIDARG, /* Win9x/WinMe/NT4/W2K/Vista/W2K8 */
+ "Unexpected result : %08x\n", hr);
}
static void test_getstring_basic(void)
More information about the wine-cvs
mailing list