[MPR_WINETEST] Sync with Wine 3.0. CORE-14225

This commit is contained in:
Amine Khaldi 2018-01-19 12:30:38 +01:00
parent 7821493171
commit 96960b6e18

View File

@ -55,7 +55,7 @@ static void test_WNetGetUniversalName(void)
ret = WNetGetUniversalNameA(driveA, UNIVERSAL_NAME_INFO_LEVEL,
buffer, &fail_size);
if(drive_type == DRIVE_REMOTE)
todo_wine ok(ret == WN_BAD_VALUE, "WNetGetUniversalNameA failed: %08x\n", ret);
todo_wine ok(ret == WN_BAD_VALUE || ret == WN_MORE_DATA, "WNetGetUniversalNameA failed: %08x\n", ret);
else
ok(ret == WN_NOT_CONNECTED || ret == WN_NO_NET_OR_BAD_PATH,
"(%s) WNetGetUniversalNameW gave wrong error: %u\n", driveA, ret);
@ -101,23 +101,25 @@ static void test_WNetGetRemoteName(void)
info_size = sizeof(buffer);
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
buffer, &info_size);
todo_wine{
if(drive_type == DRIVE_REMOTE)
todo_wine
ok(ret == WN_NO_ERROR, "WNetGetUniversalNameA failed: %08x\n", ret);
else
ok(ret == WN_NOT_CONNECTED || ret == WN_NO_NET_OR_BAD_PATH,
"(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, ret);
}
ok(info_size == sizeof(buffer), "Got wrong size: %u\n", info_size);
fail_size = 0;
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
buffer, &fail_size);
todo_wine{
if(drive_type == DRIVE_REMOTE)
todo_wine
ok(ret == WN_BAD_VALUE, "WNetGetUniversalNameA failed: %08x\n", ret);
ok(ret == WN_BAD_VALUE || ret == WN_MORE_DATA, "WNetGetUniversalNameA failed: %08x\n", ret);
else
ok(ret == WN_NOT_CONNECTED || ret == WN_NO_NET_OR_BAD_PATH,
"(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, ret);
}
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
buffer, NULL);
todo_wine ok(ret == WN_BAD_POINTER, "WNetGetUniversalNameA failed: %08x\n", ret);
@ -125,12 +127,13 @@ static void test_WNetGetRemoteName(void)
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
NULL, &info_size);
todo_wine {
if(drive_type == DRIVE_REMOTE)
todo_wine
ok(ret == WN_BAD_POINTER, "WNetGetUniversalNameA failed: %08x\n", ret);
ok(ret == WN_BAD_POINTER || ret == WN_BAD_VALUE, "WNetGetUniversalNameA failed: %08x\n", ret);
else
ok(ret == WN_NOT_CONNECTED || ret == WN_BAD_VALUE,
"(%s) WNetGetUniversalNameA gave wrong error: %u\n", driveA, ret);
}
fail_size = sizeof(driveA) / sizeof(char) - 1;
ret = WNetGetUniversalNameA(driveA, REMOTE_NAME_INFO_LEVEL,
@ -281,8 +284,9 @@ static void test_WNetUseConnection(void)
strcpy(netRes->lpRemoteName, "\\\\127.0.0.1\\c$");
bufSize = 0;
ret = pWNetUseConnectionA(NULL, netRes, NULL, NULL, 0, NULL, &bufSize, &outRes);
if (ret == ERROR_ALREADY_ASSIGNED) continue;
if (ret != ERROR_ALREADY_ASSIGNED) break;
}
if (ret == ERROR_ALREADY_ASSIGNED) goto end; /* no drives available */
todo_wine ok(ret == WN_SUCCESS, "Unexpected return: %u\n", ret);
ok(bufSize == 0, "Unexpected buffer size: %u\n", bufSize);
if (ret == WN_SUCCESS) WNetCancelConnectionA(drive, TRUE);
@ -307,6 +311,7 @@ static void test_WNetUseConnection(void)
ok(bufSize == 4, "Unexpected buffer size: %u\n", bufSize);
if (ret == WN_SUCCESS) WNetCancelConnectionA(drive, TRUE);
end:
HeapFree(GetProcessHeap(), 0, netRes);
}