Paul Vriens : shell32/tests: Fix test failures on Vista.

Alexandre Julliard julliard at winehq.org
Fri Jan 9 09:52:22 CST 2009


Module: wine
Branch: master
Commit: 189ea312d739887d6aca9223cc484564ba2a0c8e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=189ea312d739887d6aca9223cc484564ba2a0c8e

Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date:   Thu Jan  8 21:44:44 2009 +0100

shell32/tests: Fix test failures on Vista.

---

 dlls/shell32/tests/shlfileop.c |   22 ++++++++++++++++------
 1 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c
index 42deb2d..5207f01 100644
--- a/dlls/shell32/tests/shlfileop.c
+++ b/dlls/shell32/tests/shlfileop.c
@@ -323,7 +323,7 @@ static void test_get_file_info_iconlist(void)
     ok(shInfoa.dwAttributes == 0xcfcfcfcf ||
        shInfoa.dwAttributes ==  0 || /* Vista */
        broken(shInfoa.dwAttributes != 0xcfcfcfcf), /* NT4 doesn't clear but sets this field */
-       "SHGetFileInfoA(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL), unexpected dwAttributes : %08x\n",shInfoa.dwAttributes);
+       "SHGetFileInfoA(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL), unexpected dwAttributes\n");
     CloseHandle(hSysImageList);
 
     if (!pSHGetFileInfoW)
@@ -346,7 +346,9 @@ static void test_get_file_info_iconlist(void)
     todo_wine ok(shInfow.hIcon == 0, "SHGetFileInfoW(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) did not clear hIcon\n");
     ok(shInfow.szTypeName[0] == 0, "SHGetFileInfoW(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) did not clear szTypeName[0]\n");
     ok(shInfow.iIcon != 0xcfcfcfcf, "SHGetFileInfoW(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) should set iIcon\n");
-    ok(shInfow.dwAttributes == 0xcfcfcfcf, "SHGetFileInfoW(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) should not change dwAttributes\n");
+    ok(shInfow.dwAttributes == 0xcfcfcfcf ||
+       shInfoa.dwAttributes ==  0, /* Vista */
+       "SHGetFileInfoW(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) unexpected dwAttributes\n");
     CloseHandle(hSysImageList);
 
     /* Various suposidly invalid flag testing */
@@ -355,7 +357,9 @@ static void test_get_file_info_iconlist(void)
 	    SHGFI_SYSICONINDEX|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON);
     ok(hr != 0, "SHGFI_SYSICONINDEX|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON Failed\n");
     ok(shInfow.iIcon!=0xcfcfcfcf, "Icon Index Missing\n");
-    ok(shInfow.dwAttributes==0xcfcfcfcf,"dwAttributes modified\n");
+    ok(shInfow.dwAttributes==0xcfcfcfcf ||
+       shInfoa.dwAttributes==0, /* Vista */
+       "unexpected dwAttributes\n");
 
     memset(&shInfow, 0xcf, sizeof(shInfow));
     hr = pSHGetFileInfoW((const WCHAR *)pidList, 0, &shInfow, sizeof(shInfow),
@@ -380,7 +384,9 @@ static void test_get_file_info_iconlist(void)
 	    SHGFI_SYSICONINDEX|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_LARGEICON);
     ok(hr != 0, "SHGFI_SYSICONINDEX|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_LARGEICON Failed\n");
     ok(shInfow.iIcon!=0xcfcfcfcf, "Icon Index Missing\n");
-    ok(shInfow.dwAttributes==0xcfcfcfcf,"dwAttributes modified\n");
+    ok(shInfow.dwAttributes==0xcfcfcfcf ||
+       shInfoa.dwAttributes==0, /* Vista */
+       "unexpected dwAttributes\n");
 
     memset(&shInfow, 0xcf, sizeof(shInfow));
     hr = pSHGetFileInfoW((const WCHAR *)pidList, 0, &shInfow, sizeof(shInfow),
@@ -417,7 +423,9 @@ static void test_get_file_info_iconlist(void)
         SHGFI_EXETYPE);
     todo_wine ok(hr != 0, "SHGFI_SYSICONINDEX|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON|SHGFI_EXETYPE Failed\n");
     ok(shInfow.iIcon!=0xcfcfcfcf, "Icon Index Missing\n");
-    ok(shInfow.dwAttributes==0xcfcfcfcf,"dwAttributes modified\n");
+    ok(shInfow.dwAttributes==0xcfcfcfcf ||
+       shInfoa.dwAttributes==0, /* Vista */
+       "unexpected dwAttributes\n");
 
     memset(&shInfow, 0xcf, sizeof(shInfow));
     hr = pSHGetFileInfoW((const WCHAR *)pidList, 0, &shInfow, sizeof(shInfow),
@@ -446,7 +454,9 @@ static void test_get_file_info_iconlist(void)
         SHGFI_SYSICONINDEX|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_EXETYPE);
     todo_wine ok(hr != 0, "SHGFI_SYSICONINDEX|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_EXETYPE Failed\n");
     ok(shInfow.iIcon!=0xcfcfcfcf, "Icon Index Missing\n");
-    ok(shInfow.dwAttributes==0xcfcfcfcf,"dwAttributes modified\n");
+    ok(shInfow.dwAttributes==0xcfcfcfcf ||
+       shInfoa.dwAttributes==0, /* Vista */
+       "unexpected dwAttributes\n");
 
     memset(&shInfow, 0xcf, sizeof(shInfow));
     hr = pSHGetFileInfoW((const WCHAR *)pidList, 0, &shInfow, sizeof(shInfow),




More information about the wine-cvs mailing list