summaryrefslogtreecommitdiff
path: root/tests/Hakyll/Web/Template
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Hakyll/Web/Template')
-rw-r--r--tests/Hakyll/Web/Template/Tests.hs17
1 files changed, 14 insertions, 3 deletions
diff --git a/tests/Hakyll/Web/Template/Tests.hs b/tests/Hakyll/Web/Template/Tests.hs
index 8baf01b..9f8ab14 100644
--- a/tests/Hakyll/Web/Template/Tests.hs
+++ b/tests/Hakyll/Web/Template/Tests.hs
@@ -26,9 +26,20 @@ import TestSuite.Util
--------------------------------------------------------------------------------
tests :: Test
-tests = testGroup "Hakyll.Core.Template.Tests"
- [ testCase "case01" case01
- , testCase "applyJoinTemplateList" testApplyJoinTemplateList
+tests = testGroup "Hakyll.Core.Template.Tests" $ concat
+ [ [ testCase "case01" case01
+ , testCase "applyJoinTemplateList" testApplyJoinTemplateList
+ ]
+
+ , fromAssertions "readTemplate"
+ [ Template [Chunk "Hello ", Expr (Call "guest" [])]
+ @=? readTemplate "Hello $guest()$"
+ , Template
+ [If (Call "a" [StringLiteral "bar"])
+ (Template [Chunk "foo"])
+ Nothing]
+ @=? readTemplate "$if(a(\"bar\"))$foo$endif$"
+ ]
]