2011-06-05 21:13:11 +00:00
|
|
|
module Hakyll.Web.Util.Html.Tests
|
|
|
|
( tests
|
|
|
|
) where
|
|
|
|
|
|
|
|
import Test.Framework
|
|
|
|
import Test.HUnit hiding (Test)
|
|
|
|
|
|
|
|
import Hakyll.Web.Util.Html
|
|
|
|
import TestSuite.Util
|
|
|
|
|
|
|
|
tests :: [Test]
|
|
|
|
tests = concat
|
|
|
|
[ fromAssertions "stripTags"
|
|
|
|
[ "foo" @=? stripTags "<p>foo</p>"
|
|
|
|
, "foo bar" @=? stripTags "<p>foo</p> bar"
|
|
|
|
, "foo" @=? stripTags "<p>foo</p"
|
|
|
|
]
|
2011-11-25 22:05:50 +00:00
|
|
|
, fromAssertions "escapeHtml"
|
|
|
|
[ "Me & Dean" @=? escapeHtml "Me & Dean"
|
|
|
|
, "<img>" @=? escapeHtml "<img>"
|
|
|
|
]
|
2011-06-05 21:13:11 +00:00
|
|
|
]
|