summaryrefslogtreecommitdiff
path: root/tests/Hakyll/Web/Urls/Relativize
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2012-11-20 11:50:22 +0100
committerJasper Van der Jeugt <m@jaspervdj.be>2012-11-20 11:50:22 +0100
commitb5adcb69d1cd26e613c5c56c85307050bb8297cf (patch)
treebb9485213f2c2fa022c2a363de26ad0561f1d8c9 /tests/Hakyll/Web/Urls/Relativize
parentbfa10560f87b1843f9302a70f6c9333fc2731e88 (diff)
downloadhakyll-b5adcb69d1cd26e613c5c56c85307050bb8297cf.tar.gz
Update more tests
Diffstat (limited to 'tests/Hakyll/Web/Urls/Relativize')
-rw-r--r--tests/Hakyll/Web/Urls/Relativize/Tests.hs46
1 files changed, 28 insertions, 18 deletions
diff --git a/tests/Hakyll/Web/Urls/Relativize/Tests.hs b/tests/Hakyll/Web/Urls/Relativize/Tests.hs
index 465d266..e14a2a4 100644
--- a/tests/Hakyll/Web/Urls/Relativize/Tests.hs
+++ b/tests/Hakyll/Web/Urls/Relativize/Tests.hs
@@ -1,25 +1,35 @@
+--------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
module Hakyll.Web.Urls.Relativize.Tests
( tests
) where
-import Test.Framework
-import Test.HUnit hiding (Test)
-import Hakyll.Web.Urls.Relativize
-import TestSuite.Util
+--------------------------------------------------------------------------------
+import Test.Framework (Test, testGroup)
+import Test.HUnit ((@=?))
-tests :: [Test]
-tests = fromAssertions "relativizeUrls"
- [ "<a href=\"../foo\">bar</a>" @=?
- relativizeUrls ".." "<a href=\"/foo\">bar</a>"
- , "<img src=\"../../images/lolcat.png\"></img>" @=?
- relativizeUrls "../.." "<img src=\"/images/lolcat.png\" />"
- , "<a href=\"http://haskell.org\">Haskell</a>" @=?
- relativizeUrls "../.." "<a href=\"http://haskell.org\">Haskell</a>"
- , "<a href=\"http://haskell.org\">Haskell</a>" @=?
- relativizeUrls "../.." "<a href=\"http://haskell.org\">Haskell</a>"
- , "<script src=\"//ajax.googleapis.com/jquery.min.js\"></script>" @=?
- relativizeUrls "../.."
- "<script src=\"//ajax.googleapis.com/jquery.min.js\"></script>"
- ]
+
+--------------------------------------------------------------------------------
+import Hakyll.Web.Urls.Relativize
+import TestSuite.Util
+
+
+--------------------------------------------------------------------------------
+tests :: Test
+tests = testGroup "Hakyll.Web.Urls.Relativize.Tests" $
+ fromAssertions "relativizeUrls"
+ [ "<a href=\"../foo\">bar</a>" @=?
+ relativizeUrlsWith ".." "<a href=\"/foo\">bar</a>"
+ , "<img src=\"../../images/lolcat.png\"></img>" @=?
+ relativizeUrlsWith "../.." "<img src=\"/images/lolcat.png\" />"
+ , "<a href=\"http://haskell.org\">Haskell</a>" @=?
+ relativizeUrlsWith "../.."
+ "<a href=\"http://haskell.org\">Haskell</a>"
+ , "<a href=\"http://haskell.org\">Haskell</a>" @=?
+ relativizeUrlsWith "../.."
+ "<a href=\"http://haskell.org\">Haskell</a>"
+ , "<script src=\"//ajax.googleapis.com/jquery.min.js\"></script>" @=?
+ relativizeUrlsWith "../.."
+ "<script src=\"//ajax.googleapis.com/jquery.min.js\"></script>"
+ ]