on master help sign in
Add tests for stripTags
commit699a4e111309278495eda50cabe678354864a449 authorJasper Van der Jeugt <jaspervdj@gmail.com> dateSun 5 Jun 2011, 23:13 (15 years ago) parent4e7acdc
2 files changed+21
tests/Hakyll/Web/Util/Html/Tests.hs+18 tests/TestSuite.hs+3
tests/Hakyll/Web/Util/Html/Tests.hsnew file+18
@@ -0,0 +1,18 @@
1+module Hakyll.Web.Util.Html.Tests
2+ ( tests
3+ ) where
4+
5+import Test.Framework
6+import Test.HUnit hiding (Test)
7+
8+import Hakyll.Web.Util.Html
9+import TestSuite.Util
10+
11+tests :: [Test]
12+tests = concat
13+ [ fromAssertions "stripTags"
14+ [ "foo" @=? stripTags "<p>foo</p>"
15+ , "foo bar" @=? stripTags "<p>foo</p> bar"
16+ , "foo" @=? stripTags "<p>foo</p"
17+ ]
18+ ]
tests/TestSuite.hs+3
@@ -12,6 +12,7 @@ import qualified Hakyll.Web.Page.Tests
1212import qualified Hakyll.Web.Page.Metadata.Tests
1313import qualified Hakyll.Web.RelativizeUrls.Tests
1414import qualified Hakyll.Web.Template.Tests
15+import qualified Hakyll.Web.Util.Html.Tests
1516import qualified Hakyll.Web.Util.Url.Tests
1617
1718main :: IO ()
@@ -36,6 +37,8 @@ main = defaultMain
3637 Hakyll.Web.RelativizeUrls.Tests.tests
3738 , testGroup "Hakyll.Web.Template.Tests"
3839 Hakyll.Web.Template.Tests.tests
40+ , testGroup "Hakyll.Web.Util.Html.Tests"
41+ Hakyll.Web.Util.Html.Tests.tests
3942 , testGroup "Hakyll.Web.Util.Url.Tests"
4043 Hakyll.Web.Util.Url.Tests.tests
4144 ]