From ca49489110440d43823d3ee4345a0cd580bcbbc7 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Thu, 7 Mar 2013 18:41:00 +0100 Subject: Add test case to confirm #117 --- tests/Hakyll/Core/Runtime/Tests.hs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests') 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 @?= ["

This is an example.

"] -- cgit v1.2.3