Commit 344969a8 authored by sof's avatar sof
Browse files

[project @ 2002-07-23 17:11:52 by sof]

Add comments explaining why we on purpose force net001 and
net002 to fail under Win32, but don't cover up the failure in
the testscript.
parent 40ed1f2f
include ($confdir ++ "/../vanilla-test.T")
test "net001" { if $platform == "i386-unknown-mingw32" then $expect = "fail" fi
vtr("-package concurrent -package net","","") }
test "net001" { vtr("-package concurrent -package net","","") }
test "uri001" { vtr("-package network","","") }
test "net002" { vtr("-package net", "3", "") }
......@@ -4,7 +4,14 @@ import Socket
import Concurrent
import IO
main = do
-- NOTE: this test depends on non-blocking I/O support,
-- which win32 doesn't support. Rather than having the
-- test program block, we fail to initialise WinSock
-- (via withSocketsDo) here so that the test will fall over
-- (and repeatedly remind us to implement Win32 support
-- for non-blocking I/O !)
main = {- withSocketsDo $ -} do
forkIO server
yield
h <- connectTo "localhost" (PortNumber 22222)
......
-- $Id: net002.hs,v 1.2 2002/07/19 15:32:39 sof Exp $
-- $Id: net002.hs,v 1.3 2002/07/23 17:11:52 sof Exp $
-- http://www.bagley.org/~doug/shootout/
-- Haskell echo/client server
-- written by Brian Gregor
......@@ -8,6 +8,13 @@
-- !!! exposed a bug in 5.02.2's network library, accept wasn't setting the
-- socket it returned to non-blocking mode.
-- NOTE: this test depends on non-blocking I/O support,
-- which win32 doesn't support. Rather than having the
-- test program block, we fail to initialise WinSock
-- (via withSocketsDo) here so that the test will fall over
-- (and repeatedly remind us to implement Win32 support
-- for non-blocking I/O !)
module Main where
import SocketPrim
......@@ -91,7 +98,7 @@ echo_client n = do
putStr "Client read nil\n"
return []
main = do
main = {- withSocketsDo $ -} do
~[n] <- getArgs
-- server & client semaphores
-- get the server socket
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment