{-# LANGUAGE OverloadedStrings #-} module Hakyll.Web.Template.Tests ( tests ) where import Test.Framework import Test.HUnit hiding (Test) import qualified Data.Map as M import Hakyll.Web.Page import Hakyll.Web.Template import Hakyll.Web.Template.Read import TestSuite.Util tests :: [Test] tests = fromAssertions "applyTemplate" -- Hakyll templates [ applyTemplateAssertion readTemplate applyTemplate "bar" "$foo$" [("foo", "bar")] , applyTemplateAssertion readTemplate applyTemplate "$ barqux" "$$ $foo$$bar$" [("foo", "bar"), ("bar", "qux")] , applyTemplateAssertion readTemplate applyTemplate "$foo$" "$foo$" [] -- Hamlet templates , applyTemplateAssertion readHamletTemplate applyTemplate "