Paul Vriens : shell32/tests: Fix some test failures on NT4.

Alexandre Julliard julliard at winehq.org
Thu Apr 23 11:27:25 CDT 2009


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

Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date:   Wed Apr 22 17:07:45 2009 +0200

shell32/tests: Fix some test failures on NT4.

---

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

diff --git a/dlls/shell32/tests/shlfileop.c b/dlls/shell32/tests/shlfileop.c
index ff060ba..540fd0d 100644
--- a/dlls/shell32/tests/shlfileop.c
+++ b/dlls/shell32/tests/shlfileop.c
@@ -2063,21 +2063,27 @@ static void test_sh_new_link_info(void)
     set_curr_dir_path(linkto, "nosuchfile.txt\0");
     set_curr_dir_path(destdir, "testdir2\0");
     ret = SHGetNewLinkInfoA(linkto, destdir, result, &mustcopy, 0);
-    ok(ret == FALSE, "SHGetNewLinkInfoA succeeded\n");
+    ok(ret == FALSE ||
+       broken(ret == lstrlenA(result) + 1), /* NT4 */
+       "SHGetNewLinkInfoA succeeded\n");
     ok(mustcopy == FALSE, "mustcopy should be FALSE\n");
 
     /* dest dir does not exist */
     set_curr_dir_path(linkto, "test1.txt\0");
     set_curr_dir_path(destdir, "nosuchdir\0");
     ret = SHGetNewLinkInfoA(linkto, destdir, result, &mustcopy, 0);
-    ok(ret == TRUE, "SHGetNewLinkInfoA failed, err=%i\n", GetLastError());
+    ok(ret == TRUE ||
+       broken(ret == lstrlenA(result) + 1), /* NT4 */
+       "SHGetNewLinkInfoA failed, err=%i\n", GetLastError());
     ok(mustcopy == FALSE, "mustcopy should be FALSE\n");
 
     /* source file exists */
     set_curr_dir_path(linkto, "test1.txt\0");
     set_curr_dir_path(destdir, "testdir2\0");
     ret = SHGetNewLinkInfoA(linkto, destdir, result, &mustcopy, 0);
-    ok(ret == TRUE, "SHGetNewLinkInfoA failed, err=%i\n", GetLastError());
+    ok(ret == TRUE ||
+       broken(ret == lstrlenA(result) + 1), /* NT4 */
+       "SHGetNewLinkInfoA failed, err=%i\n", GetLastError());
     ok(mustcopy == FALSE, "mustcopy should be FALSE\n");
     ok(CompareStringA(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, destdir,
                       lstrlenA(destdir), result, lstrlenA(destdir)) == CSTR_EQUAL,
@@ -2088,7 +2094,9 @@ static void test_sh_new_link_info(void)
     /* preferred target name already exists */
     createTestFile(result);
     ret = SHGetNewLinkInfoA(linkto, destdir, result2, &mustcopy, 0);
-    ok(ret == TRUE, "SHGetNewLinkInfoA failed, err=%i\n", GetLastError());
+    ok(ret == TRUE ||
+       broken(ret == lstrlenA(result2) + 1), /* NT4 */
+       "SHGetNewLinkInfoA failed, err=%i\n", GetLastError());
     ok(mustcopy == FALSE, "mustcopy should be FALSE\n");
     ok(CompareStringA(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE, destdir,
                       lstrlenA(destdir), result2, lstrlenA(destdir)) == CSTR_EQUAL,




More information about the wine-cvs mailing list