summaryrefslogtreecommitdiff
path: root/tests/Hakyll
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Hakyll')
-rw-r--r--tests/Hakyll/Core/Dependencies/Tests.hs3
-rw-r--r--tests/Hakyll/Core/Provider/GlobalMetadata/Tests.hs31
-rw-r--r--tests/Hakyll/Web/Html/Tests.hs2
3 files changed, 4 insertions, 32 deletions
diff --git a/tests/Hakyll/Core/Dependencies/Tests.hs b/tests/Hakyll/Core/Dependencies/Tests.hs
index d6e3094..efa848b 100644
--- a/tests/Hakyll/Core/Dependencies/Tests.hs
+++ b/tests/Hakyll/Core/Dependencies/Tests.hs
@@ -38,7 +38,8 @@ oldFacts = M.fromList
, ("posts/02.md",
[])
, ("index.md",
- [ PatternDependency "posts/*" ["posts/01.md", "posts/02.md"]
+ [ PatternDependency "posts/*"
+ (S.fromList ["posts/01.md", "posts/02.md"])
, IdentifierDependency "posts/01.md"
, IdentifierDependency "posts/02.md"
])
diff --git a/tests/Hakyll/Core/Provider/GlobalMetadata/Tests.hs b/tests/Hakyll/Core/Provider/GlobalMetadata/Tests.hs
deleted file mode 100644
index 289e2ac..0000000
--- a/tests/Hakyll/Core/Provider/GlobalMetadata/Tests.hs
+++ /dev/null
@@ -1,31 +0,0 @@
---------------------------------------------------------------------------------
-{-# LANGUAGE OverloadedStrings #-}
-module Hakyll.Core.Provider.GlobalMetadata.Tests
- ( tests
- ) where
-
---------------------------------------------------------------------------------
-import qualified Data.Map as M
-import Control.Monad (forM_)
-import Test.Framework (Test, testGroup)
-import Test.HUnit (Assertion, (@=?))
-
-
---------------------------------------------------------------------------------
-import Hakyll.Core.Provider (resourceMetadata)
-import TestSuite.Util
-
---------------------------------------------------------------------------------
-tests :: Test
-tests = testGroup "Hakyll.Core.Provider.GlobalMetadata.Tests" $
- fromAssertions "page" [testPage]
-
-testPage :: Assertion
-testPage = do
- store <- newTestStore
- provider <- newTestProvider store
-
- metadata <- resourceMetadata provider "posts/2013-10-18-metadata-test.md"
- forM_ ["1", "2", "3", "4", "5", "6", "7", "8"] $ \a ->
- Just a @=? M.lookup ('a':a) metadata
-
diff --git a/tests/Hakyll/Web/Html/Tests.hs b/tests/Hakyll/Web/Html/Tests.hs
index e150ea2..bad5ebc 100644
--- a/tests/Hakyll/Web/Html/Tests.hs
+++ b/tests/Hakyll/Web/Html/Tests.hs
@@ -59,6 +59,8 @@ tests = testGroup "Hakyll.Web.Html.Tests" $ concat
, "." @=? toSiteRoot "index.html"
, "." @=? toSiteRoot "/index.html"
, "../.." @=? toSiteRoot "foo/bar/qux"
+ , ".." @=? toSiteRoot "./foo/bar.html"
+ , ".." @=? toSiteRoot "/foo/./bar.html"
]
, fromAssertions "isExternal"