From 2e5718ba95fadc8f4d0441cb3ca511bcec66a4cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20=C5=A0pindler?= Date: Fri, 11 Nov 2011 13:58:47 +0100 Subject: [PATCH] ws2_32: Test GetAddrInfo with zero port. --- dlls/ws2_32/tests/sock.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 7a64e0e01da..237bc863ea3 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);