on master help sign in
Add test case to confirm #117
commitca49489110440d43823d3ee4345a0cd580bcbbc7 authorJasper Van der Jeugt <m@jaspervdj.be> dateThu 7 Mar 2013, 18:41 (14 years ago) parent3cd43de
1 file changed+11
tests/Hakyll/Core/Runtime/Tests.hs+11
tests/Hakyll/Core/Runtime/Tests.hs+11
@@ -6,6 +6,7 @@ module Hakyll.Core.Runtime.Tests
66
77
88--------------------------------------------------------------------------------
9+import qualified Data.ByteString as B
910import System.FilePath ((</>))
1011import Test.Framework (Test, testGroup)
1112import Test.HUnit (Assertion, (@?=))
@@ -28,6 +29,10 @@ tests = testGroup "Hakyll.Core.Runtime.Tests" $
2829case01 :: Assertion
2930case01 = do
3031 _ <- run testConfiguration Logger.Error $ do
32+ match "images/*" $ do
33+ route idRoute
34+ compile copyFileCompiler
35+
3136 match "*.md" $ do
3237 route $ setExtension "html"
3338 compile $ do
@@ -41,6 +46,12 @@ case01 = do
4146 items <- loadAllSnapshots "*.md" "raw"
4247 makeItem $ concat $ map itemBody (items :: [Item String])
4348
49+ favicon <- B.readFile $
50+ providerDirectory testConfiguration </> "images/favicon.ico"
51+ favicon' <- B.readFile $
52+ destinationDirectory testConfiguration </> "images/favicon.ico"
53+ favicon @?= favicon'
54+
4455 example <- readFile $
4556 destinationDirectory testConfiguration </> "example.html"
4657 lines example @?= ["<p>This is an example.</p>"]