summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2013-03-07 18:41:00 +0100
committerJasper Van der Jeugt <m@jaspervdj.be>2013-03-07 18:41:00 +0100
commitca49489110440d43823d3ee4345a0cd580bcbbc7 (patch)
tree30ca91b3f1b5cb1f399a8186a988e9d7f0af50eb /tests
parent3cd43de06decfc79075890645b98342daa4bdebd (diff)
downloadhakyll-ca49489110440d43823d3ee4345a0cd580bcbbc7.tar.gz
Add test case to confirm #117
Diffstat (limited to 'tests')
-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>"]