summaryrefslogtreecommitdiff
path: root/tests/Hakyll/Web/Util/Html/Tests.hs
blob: e73c88b956f8aa90cdb857d53720d7a8154984ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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>"
        ]
    ]