on master help sign in
Add tests
24e0c1aJasper Van der Jeugt
tests/Hakyll/Web/Template/Tests.hs+14−3
@@ -26,9 +26,20 @@ import TestSuite.Util
26
26
27--------------------------------------------------------------------------------
27--------------------------------------------------------------------------------
28tests :: Test
28tests :: Test
29−tests = testGroup "Hakyll.Core.Template.Tests"
29+tests = testGroup "Hakyll.Core.Template.Tests" $ concat
30− [ testCase "case01" case01
30+ [ [ testCase "case01" case01
31− , testCase "applyJoinTemplateList" testApplyJoinTemplateList
31+ , testCase "applyJoinTemplateList" testApplyJoinTemplateList
32+ ]
33+
34+ , fromAssertions "readTemplate"
35+ [ Template [Chunk "Hello ", Expr (Call "guest" [])]
36+ @=? readTemplate "Hello $guest()$"
37+ , Template
38+ [If (Call "a" [StringLiteral "bar"])
39+ (Template [Chunk "foo"])
40+ Nothing]
41+ @=? readTemplate "$if(a(\"bar\"))$foo$endif$"
42+ ]
32 ]
43 ]
33
44
34
45