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.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/Hakyll/Web/Template/Tests.hs b/tests/Hakyll/Web/Template/Tests.hs
index 7d5d6ec..453cd49 100644
--- a/tests/Hakyll/Web/Template/Tests.hs
+++ b/tests/Hakyll/Web/Template/Tests.hs
@@ -39,6 +39,21 @@ tests = testGroup "Hakyll.Core.Template.Tests" $ concat
(Template [Chunk "foo"])
Nothing]
@=? readTemplate "$if(a(\"bar\"))$foo$endif$"
+ -- 'If' 'Trim_' test.
+ , Template
+ [ TrimL
+ , If (Ident (TemplateKey "body"))
+ (Template [ TrimR
+ , Expr (Ident (TemplateKey "body"))
+ ])
+ (Just (Template [ TrimL
+ , TrimR
+ , Expr (Ident (TemplateKey "body"))
+ ]))
+ , TrimL
+ , TrimR
+ ]
+ @=? readTemplate "$-if(body)-$\n$body$\n$-else-$\n$body$\n$-endif-$"
]
]