diff options
author | samgd <sam@samgd.com> | 2016-07-23 12:19:27 +0200 |
---|---|---|
committer | samgd <sam@samgd.com> | 2016-07-23 12:21:38 +0200 |
commit | 6c0be2e2d3b8992263573540b3498ea51b10b2e6 (patch) | |
tree | 4a4db65e5920b2d1d5fe039975a03f4f8631d521 /tests | |
parent | 02dd1cf2360cb2a650cb61c5e6ae2ca573eb5125 (diff) | |
download | hakyll-6c0be2e2d3b8992263573540b3498ea51b10b2e6.tar.gz |
If Trim parsing
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Hakyll/Web/Template/Tests.hs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/Hakyll/Web/Template/Tests.hs b/tests/Hakyll/Web/Template/Tests.hs index 453cd49..c1991a0 100644 --- a/tests/Hakyll/Web/Template/Tests.hs +++ b/tests/Hakyll/Web/Template/Tests.hs @@ -39,16 +39,20 @@ tests = testGroup "Hakyll.Core.Template.Tests" $ concat (Template [Chunk "foo"]) Nothing] @=? readTemplate "$if(a(\"bar\"))$foo$endif$" - -- 'If' 'Trim_' test. + -- 'If' trim check. , Template [ TrimL + , TrimR , If (Ident (TemplateKey "body")) - (Template [ TrimR + (Template [ Chunk "\n" , Expr (Ident (TemplateKey "body")) + , Chunk "\n" ]) (Just (Template [ TrimL , TrimR + , Chunk "\n" , Expr (Ident (TemplateKey "body")) + , Chunk "\n" ])) , TrimL , TrimR @@ -65,9 +69,8 @@ case01 = do provider <- newTestProvider store out <- resourceString provider "template.html.out" - tpl <- testCompilerDone store provider "template.html" $ - templateBodyCompiler - item <- testCompilerDone store provider "example.md" $ + tpl <- testCompilerDone store provider "template.html" templateBodyCompiler + item <- testCompilerDone store provider "example.md" $ pandocCompiler >>= applyTemplate (itemBody tpl) testContext out @=? itemBody item |