From ebe6dabe2789dd9b3214c730b686befcd54895f0 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Thu, 29 Oct 2009 11:12:00 +0100 Subject: [PATCH] ws2_32: Add a test for GetAddrInfoW. --- dlls/ws2_32/tests/sock.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 56ae78f7e2c..518ab4a2359 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -2764,6 +2764,7 @@ static void test_WSASendTo(void) 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}; int ret; @@ -2780,6 +2781,15 @@ static void test_GetAddrInfoW(void) ret = pGetAddrInfoW(NULL, NULL, NULL, &result); ok(ret == WSAHOST_NOT_FOUND, "got %d expected WSAHOST_NOT_FOUND\n", ret); + result = NULL; + ret = pGetAddrInfoW(empty, NULL, 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); -- 2.11.4.GIT