summaryrefslogtreecommitdiff
path: root/tests/Hakyll/Core/Runtime
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Hakyll/Core/Runtime')
-rw-r--r--tests/Hakyll/Core/Runtime/Tests.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/Hakyll/Core/Runtime/Tests.hs b/tests/Hakyll/Core/Runtime/Tests.hs
index 8a05824..1ca8dc1 100644
--- a/tests/Hakyll/Core/Runtime/Tests.hs
+++ b/tests/Hakyll/Core/Runtime/Tests.hs
@@ -6,6 +6,7 @@ module Hakyll.Core.Runtime.Tests
--------------------------------------------------------------------------------
+import qualified Data.ByteString as B
import System.FilePath ((</>))
import Test.Framework (Test, testGroup)
import Test.HUnit (Assertion, (@?=))
@@ -28,6 +29,10 @@ tests = testGroup "Hakyll.Core.Runtime.Tests" $
case01 :: Assertion
case01 = do
_ <- run testConfiguration Logger.Error $ do
+ match "images/*" $ do
+ route idRoute
+ compile copyFileCompiler
+
match "*.md" $ do
route $ setExtension "html"
compile $ do
@@ -41,6 +46,12 @@ case01 = do
items <- loadAllSnapshots "*.md" "raw"
makeItem $ concat $ map itemBody (items :: [Item String])
+ favicon <- B.readFile $
+ providerDirectory testConfiguration </> "images/favicon.ico"
+ favicon' <- B.readFile $
+ destinationDirectory testConfiguration </> "images/favicon.ico"
+ favicon @?= favicon'
+
example <- readFile $
destinationDirectory testConfiguration </> "example.html"
lines example @?= ["<p>This is an example.</p>"]