@@ -13,6 +13,7 @@ import Test.HUnit (Assertion, (@=?), (@?=))
1313
1414--------------------------------------------------------------------------------
1515import Hakyll.Core.Compiler
16+import Hakyll.Core.Identifier
1617import Hakyll.Core.Item
1718import Hakyll.Core.Provider
1819import Hakyll.Web.Pandoc
@@ -26,7 +27,8 @@ import TestSuite.Util
2627--------------------------------------------------------------------------------
2728tests :: Test
2829tests = testGroup "Hakyll.Core.Template.Tests" $ concat
29− [ [ testCase "case01" case01
30+ [ [ testCase "case01" $ test ("template.html.out", "template.html", "example.md")
31+ , testCase "case02" $ test ("strip.html.out", "strip.html", "example.md")
3032 , testCase "applyJoinTemplateList" testApplyJoinTemplateList
3133 ]
3234
@@ -78,14 +80,14 @@ tests = testGroup "Hakyll.Core.Template.Tests" $ concat
7880
7981
8082--------------------------------------------------------------------------------
81−case01 :: Assertion
82−case01 = do
83+test :: (Identifier, Identifier, Identifier) -> Assertion
84+test (outf, tplf, itemf) = do
8385 store <- newTestStore
8486 provider <- newTestProvider store
8587
86− out <- resourceString provider "template.html.out"
87− tpl <- testCompilerDone store provider "template.html" templateBodyCompiler
88− item <- testCompilerDone store provider "example.md" $
88+ out <- resourceString provider outf
89+ tpl <- testCompilerDone store provider tplf templateBodyCompiler
90+ item <- testCompilerDone store provider itemf $
8991 pandocCompiler >>= applyTemplate (itemBody tpl) testContext
9092
9193 out @=? itemBody item