hakyll/tests/Hakyll/Web/Util/Html/Tests.hs

30 lines
963 B
Haskell
Raw Normal View History

2012-11-26 15:11:37 +00:00
--------------------------------------------------------------------------------
2011-06-05 21:13:11 +00:00
module Hakyll.Web.Util.Html.Tests
( tests
) where
2012-11-26 15:11:37 +00:00
--------------------------------------------------------------------------------
import Test.Framework (Test, testGroup)
import Test.HUnit ((@=?))
2011-06-05 21:13:11 +00:00
2012-11-26 15:11:37 +00:00
--------------------------------------------------------------------------------
import Hakyll.Web.Util.Html
import TestSuite.Util
--------------------------------------------------------------------------------
tests :: Test
tests = testGroup "Hakyll.Web.Util.Html" $ concat
2011-06-05 21:13:11 +00:00
[ 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 &amp; Dean" @=? escapeHtml "Me & Dean"
, "&lt;img&gt;" @=? escapeHtml "<img>"
]
2011-06-05 21:13:11 +00:00
]