on master help sign in
Add tests
commit24e0c1a91858832ad8d37feaabf3b30dc1027230 authorJasper Van der Jeugt <m@jaspervdj.be> dateMon 27 Oct 2014, 13:19 (12 years ago) parent59b6f01
1 file changed+14−3
tests/Hakyll/Web/Template/Tests.hs+14−3
tests/Hakyll/Web/Template/Tests.hs+14−3
@@ -26,9 +26,20 @@ import TestSuite.Util
2626
2727--------------------------------------------------------------------------------
2828tests :: Test
29−tests = testGroup "Hakyll.Core.Template.Tests"
30− [ testCase "case01" case01
31− , testCase "applyJoinTemplateList" testApplyJoinTemplateList
29+tests = testGroup "Hakyll.Core.Template.Tests" $ concat
30+ [ [ testCase "case01" case01
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+ ]
3243 ]
3344
3445