Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update deps, repair test suite

  • Loading branch information...
commit f0f40f797a8bc3d125fe1aa87c1d9020a7cf2fb6 1 parent b59ca1e
@gregorycollins gregorycollins authored
View
2  snap-core.cabal
@@ -139,7 +139,7 @@ Library
attoparsec >= 0.8.0.2 && < 0.10,
attoparsec-enumerator >= 0.2.0.3,
base >= 4.3 && < 5,
- base16-bytestring <= 0.1.1.1,
+ base16-bytestring <= 0.2,
blaze-builder >= 0.2.1.4 && <0.4,
bytestring,
bytestring-nums,
View
1  test/snap-core-testsuite.cabal
@@ -46,7 +46,6 @@ Executable testsuite
old-time,
parallel >= 3 && <4,
pureMD5 == 2.1.*,
- random <= 1.0.0.2,
regex-posix >= 0.94.4 && <0.96,
test-framework >= 0.4 && < 0.5,
test-framework-hunit >= 0.2.5 && < 0.3,
View
21 test/suite/Snap/Util/FileUploads/Tests.hs
@@ -211,7 +211,7 @@ testFormInputPolicyViolation = testCase "fileUploads/formInputTooBig" $
------------------------------------------------------------------------------
testNoBoundary :: Test
testNoBoundary = testCase "fileUploads/noBoundary" $
- expectException $
+ expectExceptionH $
harness' goBadContentType tmpdir hndl mixedTestBody
where
tmpdir = "tempdir_noboundary"
@@ -227,7 +227,7 @@ testNoBoundary = testCase "fileUploads/noBoundary" $
------------------------------------------------------------------------------
testNoMixedBoundary :: Test
testNoMixedBoundary = testCase "fileUploads/noMixedBoundary" $
- expectException $
+ expectExceptionH $
harness' go tmpdir hndl badMixedBody
where
tmpdir = "tempdir_mixednoboundary"
@@ -243,7 +243,7 @@ testNoMixedBoundary = testCase "fileUploads/noMixedBoundary" $
------------------------------------------------------------------------------
testWrongContentType :: Test
testWrongContentType = testCase "fileUploads/wrongContentType" $
- expectException $
+ expectExceptionH $
harness' goWrongContentType tmpdir hndl mixedTestBody
where
tmpdir = "tempdir_noboundary"
@@ -378,9 +378,9 @@ mkDamagedRequest :: ByteString -> IO Request
mkDamagedRequest body = do
enum <- newIORef $ SomeEnumerator $ enum
- let hdrs = Map.fromList [
- ("Content-type", [S.append "multipart/form-data; boundary="
- boundaryValue])
+ let hdrs = H.fromList [
+ ("Content-type", S.append "multipart/form-data; boundary="
+ boundaryValue)
]
return $ Request "foo" 80 "foo" 999 "foo" 1000 "foo" False hdrs
@@ -599,12 +599,3 @@ bigHeadersBody =
, boundaryValue
, "--\r\n"
])
-
-
-------------------------------------------------------------------------------
-expectException :: IO a -> IO ()
-expectException m = do
- e <- try m
- case e of
- Left (z::SomeException) -> (show z) `deepseq` return ()
- Right _ -> assertFailure "expected exception, didn't get one"
Please sign in to comment.
Something went wrong with that request. Please try again.