Alexandre Julliard : wininet/tests: Fix a test failure on Win2k.

Alexandre Julliard julliard at winehq.org
Fri Feb 5 08:42:31 CST 2010


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Feb  5 11:44:18 2010 +0100

wininet/tests: Fix a test failure on Win2k.

---

 dlls/wininet/tests/ftp.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/dlls/wininet/tests/ftp.c b/dlls/wininet/tests/ftp.c
index d152601..df9c347 100644
--- a/dlls/wininet/tests/ftp.c
+++ b/dlls/wininet/tests/ftp.c
@@ -800,10 +800,16 @@ static void test_find_first_file(HINTERNET hFtp, HINTERNET hConnect)
     SetLastError(0xdeadbeef);
     hSearch = FtpFindFirstFileA(hFtp, "welcome.msg", &findData, 0, 0);
     error = GetLastError();
-    ok ( hSearch == NULL, "Expected FtpFindFirstFileA to fail\n" );
-    ok ( error == ERROR_FTP_TRANSFER_IN_PROGRESS || broken(error == ERROR_INTERNET_EXTENDED_ERROR),
-        "Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d\n", error );
-    InternetCloseHandle(hSearch); /* Just in case */
+    ok ( hSearch == NULL || broken(hSearch != NULL), /* win2k */
+         "Expected FtpFindFirstFileA to fail\n" );
+    if (!hSearch)
+        ok ( error == ERROR_FTP_TRANSFER_IN_PROGRESS || broken(error == ERROR_INTERNET_EXTENDED_ERROR),
+             "Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d\n", error );
+    else
+    {
+        ok( error == ERROR_SUCCESS, "wrong error %u on success\n", GetLastError() );
+        InternetCloseHandle(hSearch);
+    }
 
     InternetCloseHandle(hOpenFile);
 




More information about the wine-cvs mailing list