blob: 3a99ca75322efcd87efd7e8fa2c4cac4125fc258 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
--------------------------------------------------------------------------------
module Hakyll.Web.Util.Html.Tests
( tests
) where
--------------------------------------------------------------------------------
import Test.Framework (Test, testGroup)
import Test.HUnit ((@=?))
--------------------------------------------------------------------------------
import Hakyll.Web.Util.Html
import TestSuite.Util
--------------------------------------------------------------------------------
tests :: Test
tests = testGroup "Hakyll.Web.Util.Html" $ concat
[ fromAssertions "stripTags"
[ "foo" @=? stripTags "<p>foo</p>"
, "foo bar" @=? stripTags "<p>foo</p> bar"
, "foo" @=? stripTags "<p>foo</p"
]
, fromAssertions "escapeHtml"
[ "Me & Dean" @=? escapeHtml "Me & Dean"
, "<img>" @=? escapeHtml "<img>"
]
]
|