Merge pull request #1 from sol/master

Depend on hspec >= 1.3
This commit is contained in:
Greg Weber 2013-06-29 15:07:06 -07:00
commit 146facd2e0
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,10 +11,12 @@ test f actual expected = do
let result = f actual
result @?= expected
sanitized :: Text -> Text -> Expectation
sanitized = test sanitize
sanitizedB = test sanitizeBalance
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

@ -39,7 +39,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