From 7aaec2e667ec1944c9f8d2500be32e75c9fa35a4 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 5 Feb 2010 11:44:18 +0100 Subject: [PATCH] wininet/tests: Fix a test failure on Win2k. --- dlls/wininet/tests/ftp.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/dlls/wininet/tests/ftp.c b/dlls/wininet/tests/ftp.c index d152601b965..df9c34753d6 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); -- 2.11.4.GIT