Require hspec >= 1.3

This commit is contained in:
Simon Hengel 2012-09-15 22:57:14 +02:00
parent 42695f384a
commit 9a41af21e9
2 changed files with 5 additions and 5 deletions

View File

@ -2,10 +2,8 @@
import Text.HTML.SanitizeXSS
import Text.HTML.SanitizeXSS.Css
import Data.Text (Text)
import Data.Text as T
import Test.Hspec.Monadic
import Test.Hspec.HUnit ()
import Test.Hspec
import Test.HUnit (assert, (@?=), Assertion)
test :: (Text -> Text) -> Text -> Text -> Assertion
@ -13,9 +11,11 @@ test f actual expected = do
let result = f actual
result @?= expected
sanitized :: Text -> Text -> Expectation
sanitized = test sanitize
main = hspecX $ do
main :: IO ()
main = hspec $ do
describe "html sanitizing" $ do
it "big test" $ do
let testHTML = " <a href='http://safe.com'>safe</a><a href='unsafe://hack.com'>anchor</a> <img src='evil://evil.com' /> <unsafe></foo> <bar /> <br></br> <b>Unbalanced</div><img src='http://safe.com'>"

View File

@ -38,7 +38,7 @@ test-suite test
, css-text >= 0.1.1 && < 0.2
, text >= 0.11 && < 1
, attoparsec >= 0.10.0.3 && < 1
, hspec >= 0.8
, hspec >= 1.3
, HUnit >= 1.2