diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Hakyll/Web/Util/Html/Tests.hs | 18 | ||||
-rw-r--r-- | tests/TestSuite.hs | 3 |
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/Hakyll/Web/Util/Html/Tests.hs b/tests/Hakyll/Web/Util/Html/Tests.hs new file mode 100644 index 0000000..fc72cdf --- /dev/null +++ b/tests/Hakyll/Web/Util/Html/Tests.hs @@ -0,0 +1,18 @@ +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" + ] + ] diff --git a/tests/TestSuite.hs b/tests/TestSuite.hs index fe9012d..0f13106 100644 --- a/tests/TestSuite.hs +++ b/tests/TestSuite.hs @@ -12,6 +12,7 @@ import qualified Hakyll.Web.Page.Tests import qualified Hakyll.Web.Page.Metadata.Tests import qualified Hakyll.Web.RelativizeUrls.Tests import qualified Hakyll.Web.Template.Tests +import qualified Hakyll.Web.Util.Html.Tests import qualified Hakyll.Web.Util.Url.Tests main :: IO () @@ -36,6 +37,8 @@ main = defaultMain Hakyll.Web.RelativizeUrls.Tests.tests , testGroup "Hakyll.Web.Template.Tests" Hakyll.Web.Template.Tests.tests + , testGroup "Hakyll.Web.Util.Html.Tests" + Hakyll.Web.Util.Html.Tests.tests , testGroup "Hakyll.Web.Util.Url.Tests" Hakyll.Web.Util.Url.Tests.tests ] |