@@ -6,7 +6,6 @@ module Hakyll.Web.Template.Tests
8--------------------------------------------------------------------------------
8--------------------------------------------------------------------------------
9−import Data.Monoid (mconcat)
10import Test.Framework (Test, testGroup)
9import Test.Framework (Test, testGroup)
11import Test.Framework.Providers.HUnit (testCase)
10import Test.Framework.Providers.HUnit (testCase)
12import Test.HUnit (Assertion, (@=?), (@?=))
11import Test.HUnit (Assertion, (@=?), (@?=))
@@ -33,12 +32,12 @@ tests = testGroup "Hakyll.Core.Template.Tests" $ concat
34 , fromAssertions "readTemplate"
33 , fromAssertions "readTemplate"
35 [ Template [Chunk "Hello ", Expr (Call "guest" [])]
34 [ Template [Chunk "Hello ", Expr (Call "guest" [])]
36− @=? readTemplate "Hello $guest()$"
35+ @=? readTemplate "Hello $guest()$"
37 , Template
36 , Template
38 [If (Call "a" [StringLiteral "bar"])
37 [If (Call "a" [StringLiteral "bar"])
39 (Template [Chunk "foo"])
38 (Template [Chunk "foo"])
41− @=? readTemplate "$if(a(\"bar\"))$foo$endif$"
40+ @=? readTemplate "$if(a(\"bar\"))$foo$endif$"
42 -- 'If' trim check.
41 -- 'If' trim check.
43 , Template
42 , Template
@@ -58,6 +57,17 @@ tests = testGroup "Hakyll.Core.Template.Tests" $ concat
60 @=? readTemplate "$-if(body)-$\n$body$\n$-else-$\n$body$\n$-endif-$"
59 @=? readTemplate "$-if(body)-$\n$body$\n$-else-$\n$body$\n$-endif-$"
64+ , For (Ident (TemplateKey "authors"))
65+ (Template [Chunk "\n body \n"])
70+ @=? readTemplate "$-for(authors)-$\n body \n$-endfor-$"