From 24e0c1a91858832ad8d37feaabf3b30dc1027230 Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Mon, 27 Oct 2014 13:19:56 +0100 Subject: Add tests --- tests/Hakyll/Web/Template/Tests.hs | 17 ++++++++++++++--- 1 file 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$" + ] ] -- cgit v1.2.3