packages feed

hakyll 4.2.1.1 → 4.2.1.2

raw patch · 3 files changed

+86/−5 lines, 3 filesdep ~pandocPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: pandoc

API changes (from Hackage documentation)

Files

hakyll.cabal view
@@ -1,5 +1,5 @@ Name:    hakyll-Version: 4.2.1.1+Version: 4.2.1.2  Synopsis: A static website compiler library Description:@@ -151,7 +151,7 @@     old-locale   >= 1.0    && < 1.1,     old-time     >= 1.0    && < 1.2,     cmdargs      >= 0.10   && < 0.11,-    pandoc       >= 1.10   && < 1.11,+    pandoc       >= 1.10   && < 1.12,     parsec       >= 3.0    && < 3.2,     process      >= 1.0    && < 1.2,     random       >= 1.0    && < 1.1,@@ -186,6 +186,7 @@   Other-modules:     Hakyll.Core.Dependencies.Tests     Hakyll.Core.Identifier.Tests+    Hakyll.Core.Provider.Metadata.Tests     Hakyll.Core.Provider.Tests     Hakyll.Core.Routes.Tests     Hakyll.Core.Rules.Tests@@ -193,10 +194,11 @@     Hakyll.Core.Store.Tests     Hakyll.Core.UnixFilter.Tests     Hakyll.Core.Util.String.Tests+    Hakyll.Web.Html.RelativizeUrls.Tests+    Hakyll.Web.Html.Tests+    Hakyll.Web.Pandoc.FileType.Tests     Hakyll.Web.Template.Context.Tests     Hakyll.Web.Template.Tests-    Hakyll.Web.Html.Tests-    Hakyll.Web.Html.RelativizeUrls.Tests     TestSuite.Util    Build-Depends:@@ -222,7 +224,7 @@     old-locale   >= 1.0    && < 1.1,     old-time     >= 1.0    && < 1.2,     cmdargs      >= 0.10   && < 0.11,-    pandoc       >= 1.10   && < 1.11,+    pandoc       >= 1.10   && < 1.12,     parsec       >= 3.0    && < 3.2,     process      >= 1.0    && < 1.2,     random       >= 1.0    && < 1.1,
+ tests/Hakyll/Core/Provider/Metadata/Tests.hs view
@@ -0,0 +1,53 @@+--------------------------------------------------------------------------------+module Hakyll.Core.Provider.Metadata.Tests+    ( tests+    ) where+++--------------------------------------------------------------------------------+import           Test.Framework                (Test, testGroup)+import           Test.HUnit                    (Assertion, (@=?))+import           Text.Parsec                   as P+import           Text.Parsec.String            (Parser)+++--------------------------------------------------------------------------------+import           Hakyll.Core.Provider.Metadata+import           TestSuite.Util+++--------------------------------------------------------------------------------+tests :: Test+tests = testGroup "Hakyll.Core.Provider.Metadata.Tests" $+    fromAssertions "page" [testPage01, testPage02]+++--------------------------------------------------------------------------------+testPage01 :: Assertion+testPage01 = testParse page ([("foo", "bar")], "qux\n")+    "---\n\+    \foo: bar\n\+    \---\n\+    \qux\n"+++--------------------------------------------------------------------------------+testPage02 :: Assertion+testPage02 = testParse page+    ([("description", descr)], "Hello I am dog\n")+    "---\n\+    \description: A long description that would look better if it\n\+    \             spanned multiple lines and was indented\n\+    \---\n\+    \Hello I am dog\n"+  where+    descr =+        "A long description that would look better if it \+        \spanned multiple lines and was indented"+++--------------------------------------------------------------------------------+testParse :: (Eq a, Show a) => Parser a -> a -> String -> Assertion+testParse parser expected input = case P.parse parser "<inline>" input of+    Left err -> error $ show err+    Right x  -> expected @=? x
+ tests/Hakyll/Web/Pandoc/FileType/Tests.hs view
@@ -0,0 +1,26 @@+--------------------------------------------------------------------------------+{-# LANGUAGE OverloadedStrings #-}+module Hakyll.Web.Pandoc.FileType.Tests+    ( tests+    ) where+++--------------------------------------------------------------------------------+import           Test.Framework                 (Test, testGroup)+import           Test.HUnit                     ((@=?))+++--------------------------------------------------------------------------------+import           Hakyll.Web.Pandoc.FileType+import           TestSuite.Util+++--------------------------------------------------------------------------------+tests :: Test+tests = testGroup "Hakyll.Web.Pandoc.FileType.Tests" $+    fromAssertions "fileType"+        [ Markdown                 @=? fileType "index.md"+        , Rst                      @=? fileType "about/foo.rst"+        , LiterateHaskell Markdown @=? fileType "posts/bananas.lhs"+        , LiterateHaskell LaTeX    @=? fileType "posts/bananas.tex.lhs"+        ]