[PATCH] shlwapi/tests: skip SHCreateStreamOnFileA/W configurations not supported on Win98 SE.

Reece Dunn msclrhd at googlemail.com
Mon Feb 22 18:28:13 CST 2010


Hi,

This fixes the shlwapi:istream tests on Win98 SE, skipping the
mode/stgm configurations it does not like.

- Reece
-------------- next part --------------
From 1eebcf2a047eec34424e691d005bf01cefc8a7da Mon Sep 17 00:00:00 2001
From: Reece Dunn <msclrhd at gmail.com>
Date: Tue, 23 Feb 2010 00:25:12 +0000
Subject: [PATCH] shlwapi/tests: skip SHCreateStreamOnFileA/W configurations not supported on Win98 SE.

---
 dlls/shlwapi/tests/istream.c |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/dlls/shlwapi/tests/istream.c b/dlls/shlwapi/tests/istream.c
index 67d1fe2..fad6132 100644
--- a/dlls/shlwapi/tests/istream.c
+++ b/dlls/shlwapi/tests/istream.c
@@ -208,12 +208,16 @@ static void test_SHCreateStreamOnFileA(DWORD mode, DWORD stgm)
     /* invalid arguments */
 
     stream = NULL;
-    /* NT: ERROR_PATH_NOT_FOUND, 9x: ERROR_BAD_PATHNAME */
     ret = (*pSHCreateStreamOnFileA)(NULL, mode | stgm, &stream);
-    ok(ret == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) ||
-        ret == HRESULT_FROM_WIN32(ERROR_BAD_PATHNAME),
-        "SHCreateStreamOnFileA: expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND)"
-        "or HRESULT_FROM_WIN32(ERROR_BAD_PATHNAME), got 0x%08x\n", ret);
+    if (ret == E_INVALIDARG) /* Win98 SE */ {
+        skip("Not supported\n");
+        return;
+    }
+
+    ok(ret == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND) /* NT */ ||
+       ret == HRESULT_FROM_WIN32(ERROR_BAD_PATHNAME) /* 9x */,
+       "SHCreateStreamOnFileA: expected HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "
+       "HRESULT_FROM_WIN32(ERROR_BAD_PATHNAME), got 0x%08x\n", ret);
     ok(stream == NULL, "SHCreateStreamOnFileA: expected a NULL IStream object, got %p\n", stream);
 
 #if 0 /* This test crashes on WinXP SP2 */
@@ -342,6 +346,11 @@ static void test_SHCreateStreamOnFileW(DWORD mode, DWORD stgm)
 
     stream = NULL;
     ret = (*pSHCreateStreamOnFileW)(test_file, mode | STGM_FAILIFTHERE | stgm, &stream);
+    if (ret == E_INVALIDARG) /* Win98 SE */ {
+        skip("Not supported\n");
+        return;
+    }
+
     ok(ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "SHCreateStreamOnFileW: expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got 0x%08x\n", ret);
     ok(stream == NULL, "SHCreateStreamOnFileW: expected a NULL IStream object, got %p\n", stream);
 
-- 
1.6.3.3


More information about the wine-patches mailing list