hakyll/tests/Hakyll/Web/Util/Html/Tests.hs
2011-11-25 23:05:50 +01:00

22 lines
535 B
Haskell

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"
]
, fromAssertions "escapeHtml"
[ "Me &amp; Dean" @=? escapeHtml "Me & Dean"
, "&lt;img&gt;" @=? escapeHtml "<img>"
]
]