This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "snap-server".
The branch, master has been updated
via 7945b1412c94ca42836e8879ddf4c53c32fbc7f4 (commit)
from 1307f3516ed5cb83226b84841bf69dd3b1ddfbf8 (commit)
Summary of changes:
test/snap-server-testsuite.cabal | 27 ++++++++++++++++++------
test/suite/Snap/Internal/Http/Server/Tests.hs | 13 ++++-------
2 files changed, 25 insertions(+), 15 deletions(-)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 7945b1412c94ca42836e8879ddf4c53c32fbc7f4
Author: Shu-yu Guo <[email protected]>
Date: Sun Jun 6 20:32:43 2010 -0700
Update tests to reflect sendfile changes
diff --git a/test/snap-server-testsuite.cabal b/test/snap-server-testsuite.cabal
index fe3d4f4..0393d9e 100644
--- a/test/snap-server-testsuite.cabal
+++ b/test/snap-server-testsuite.cabal
@@ -93,14 +93,15 @@ Executable pongserver
iteratee >= 0.3.1 && < 0.4,
network == 2.2.1.7,
network-bytestring >= 0.1.2 && < 0.2,
- sendfile >= 0.6.1 && < 0.7,
snap-core >= 0.2.7 && <0.3,
time,
transformers,
unix-compat,
vector >= 0.6.0.1 && < 0.7
- if !os(windows)
+ if flag(portable) || os(windows)
+ cpp-options: -DPORTABLE
+ else
build-depends: unix
if flag(libev)
@@ -113,11 +114,23 @@ Executable pongserver
other-modules: Snap.Internal.Http.Server.SimpleBackend
- if os(linux)
- cpp-options: -DLINUX
+ if os(linux) && !flag(portable)
+ cpp-options: -DLINUX -DHAS_SENDFILE
+ other-modules:
+ System.SendFile,
+ System.SendFile.Linux
+
+ if os(darwin) && !flag(portable)
+ cpp-options: -DOSX -DHAS_SENDFILE
+ other-modules:
+ System.SendFile,
+ System.SendFile.Darwin
- if os(darwin)
- cpp-options: -DOSX
+ if os(freebsd) && !flag(portable)
+ cpp-options: -DFREEBSD -DHAS_SENDFILE
+ other-modules:
+ System.SendFile,
+ System.SendFile.FreeBSD
if flag(portable) || os(windows)
cpp-options: -DPORTABLE
@@ -134,4 +147,4 @@ Executable benchmark
network == 2.2.1.7,
HTTP >= 4000.0.9 && < 4001,
criterion == 0.5.0.0
-
\ No newline at end of file
+
diff --git a/test/suite/Snap/Internal/Http/Server/Tests.hs
b/test/suite/Snap/Internal/Http/Server/Tests.hs
index 7b98945..bf92b41 100644
--- a/test/suite/Snap/Internal/Http/Server/Tests.hs
+++ b/test/suite/Snap/Internal/Http/Server/Tests.hs
@@ -36,9 +36,6 @@ import Snap.Internal.Http.Server
import Snap.Iteratee
import Snap.Types
-import Snap.Internal.Iteratee.Debug
-
-import System.IO
tests :: [Test]
tests = [ testHttpRequest1
@@ -293,7 +290,7 @@ rsm = runServerMonad "localhost" "127.0.0.1" 80 "127.0.0.1"
58382 alog elog
testHttpResponse1 :: Test
testHttpResponse1 = testCase "HttpResponse1" $ do
- let onSendFile = \f -> enumFile f copyingStream2stream >>= run
+ let onSendFile = \f _ -> enumFile f copyingStream2stream >>= run
buf <- mkIterateeBuffer
@@ -319,7 +316,7 @@ testHttpResponse1 = testCase "HttpResponse1" $ do
testHttpResponse2 :: Test
testHttpResponse2 = testCase "HttpResponse2" $ do
- let onSendFile = \f -> enumFile f copyingStream2stream >>= run
+ let onSendFile = \f _ -> enumFile f copyingStream2stream >>= run
buf <- mkIterateeBuffer
@@ -345,7 +342,7 @@ testHttpResponse2 = testCase "HttpResponse2" $ do
testHttpResponse3 :: Test
testHttpResponse3 = testCase "HttpResponse3" $ do
- let onSendFile = \f -> enumFile f copyingStream2stream >>= run
+ let onSendFile = \f _ -> enumFile f copyingStream2stream >>= run
buf <- mkIterateeBuffer
@@ -440,8 +437,8 @@ testHttp1 = testCase "http session" $ do
assertBool "pipelined responses" ok
-mkIter :: IORef L.ByteString -> (Iteratee IO (), FilePath -> IO ())
-mkIter ref = (iter, \f -> onF f iter)
+mkIter :: IORef L.ByteString -> (Iteratee IO (), FilePath -> Int -> IO ())
+mkIter ref = (iter, \f _ -> onF f iter)
where
iter = do
x <- copyingStream2stream
-----------------------------------------------------------------------
hooks/post-receive
--
snap-server
_______________________________________________
Snap mailing list
[email protected]
http://mailman-mail5.webfaction.com/listinfo/snap