Module: wine Branch: refs/heads/master Commit: 6495e66b3a26be98734f34545826651147bbeb81 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=6495e66b3a26be98734f3454...
Author: Phil Lodwick Phil.Lodwick@efi.com Date: Thu Feb 2 13:50:41 2006 +0100
winsock/tests: Add a todo_wine test for select.
---
dlls/winsock/tests/sock.c | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/dlls/winsock/tests/sock.c b/dlls/winsock/tests/sock.c index d09976d..13f4173 100644 --- a/dlls/winsock/tests/sock.c +++ b/dlls/winsock/tests/sock.c @@ -1317,6 +1317,30 @@ static void test_WSAStringToAddressW(voi "WSAStringToAddressW() failed unexpectedly: %d\n", GLE ); }
+static void test_select(void) +{ + SOCKET fd; + + fd = socket(AF_INET, SOCK_STREAM, 0); + if (fd != INVALID_SOCKET) + { + fd_set readfds; + struct timeval select_timeout; + + FD_ZERO(&readfds); + FD_SET(fd, &readfds); + select_timeout.tv_sec=2; + select_timeout.tv_usec=0; + + todo_wine { + if (select((int) fd+1, &readfds, NULL, NULL, &select_timeout) != SOCKET_ERROR) + ok(!FD_ISSET(fd, &readfds), "FD should not be set\n"); + } + + closesocket(fd); + } +} + /**************** Main program ***************/
START_TEST( sock ) @@ -1344,5 +1368,7 @@ START_TEST( sock ) test_WSAStringToAddressA(); test_WSAStringToAddressW();
+ test_select(); + Exit(); }