Module: wine Branch: master Commit: 2e5718ba95fadc8f4d0441cb3ca511bcec66a4cb URL: http://source.winehq.org/git/wine.git/?a=commit;h=2e5718ba95fadc8f4d0441cb3c...
Author: Matej Špindler spindler.matej@gmail.com Date: Fri Nov 11 13:58:47 2011 +0100
ws2_32: Test GetAddrInfo with zero port.
---
dlls/ws2_32/tests/sock.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 7a64e0e..237bc86 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -4152,6 +4152,7 @@ static void test_GetAddrInfoW(void) static const WCHAR port[] = {'8','0',0}; static const WCHAR empty[] = {0}; static const WCHAR localhost[] = {'l','o','c','a','l','h','o','s','t',0}; + static const WCHAR zero[] = {'0',0};
int ret; ADDRINFOW *result, hint; @@ -4176,6 +4177,24 @@ static void test_GetAddrInfoW(void) } pFreeAddrInfoW(result);
+ result = NULL; + ret = pGetAddrInfoW(NULL, zero, NULL, &result); + todo_wine + { + ok(!ret, "GetAddrInfoW failed with %d\n", WSAGetLastError()); + ok(result != NULL, "GetAddrInfoW failed\n"); + } + pFreeAddrInfoW(result); + + result = NULL; + ret = pGetAddrInfoW(empty, zero, NULL, &result); + todo_wine + { + ok(!ret, "GetAddrInfoW failed with %d\n", WSAGetLastError()); + ok(result != NULL, "GetAddrInfoW failed\n"); + } + pFreeAddrInfoW(result); + ret = pGetAddrInfoW(localhost, NULL, NULL, &result); ok(!ret, "GetAddrInfoW failed with %d\n", WSAGetLastError()); pFreeAddrInfoW(result);