packages feed

pandoc-include-code 1.3.0.0 → 1.4.0.0

raw patch · 8 files changed

+44/−11 lines, 8 filesdep ~text

Dependency ranges changed: text

Files

CHANGELOG.md view
@@ -1,5 +1,7 @@ # Changelog +* **1.4.0.0**+  - Use data files for test fixtures, fixing Nixpkgs test problem * **1.3.0.0**   - "Snippet mode" and "range mode" can no longer be used together   - Using the `numberLines` class sets the `startFrom` attribute for correct
pandoc-include-code.cabal view
@@ -7,15 +7,21 @@   together with preformatted HTML-like sources, in Pandoc. author:              Oskar Wickström maintainer:          Oskar Wickström-homepage:	     https://github.com/owickstrom/pandoc-include-code-version:             1.3.0.0+homepage:	           https://github.com/owickstrom/pandoc-include-code+version:             1.4.0.0 cabal-version:       >= 1.8 build-type:          Simple category:            Documentation license:             MPL-2.0 license-file:        LICENSE extra-source-files:  CHANGELOG.md+data-files:+  test/fixtures/foo-snippet.txt+  test/fixtures/foo-snippets.txt+  test/fixtures/indents.txt+  test/fixtures/some-text.txt + source-repository head   type:     git   location: git://github.com/owickstrom/pandoc-include-code.git@@ -28,7 +34,7 @@                    , unordered-containers >= 0.2      && < 0.3                    , process                    , filepath-                   , text                 >= 1.2      && < 1.3+                   , text                 >= 1.2      && < 2                    , mtl                  >= 2.2      && < 3                    , pandoc-types         >= 1.12     && <= 1.19 @@ -44,6 +50,7 @@     type:            exitcode-stdio-1.0     hs-source-dirs:  test     other-modules:   FilterTest+                   , Paths_pandoc_include_code     main-is:         Driver.hs     build-depends:   base                 >= 4        && < 5                    , pandoc-types         >= 1.12     && <= 1.19
test/Driver.hs view
@@ -1,7 +1,6 @@ module Main where -import Test.Tasty-import Test.Tasty.HUnit+import           Test.Tasty  import qualified FilterTest 
test/FilterTest.hs view
@@ -1,14 +1,16 @@-{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE LambdaCase    #-} {-# LANGUAGE TupleSections #-}  module FilterTest where -import Test.Tasty-import Test.Tasty.HUnit+import           Test.Tasty+import           Test.Tasty.HUnit  import qualified Text.Pandoc.Filter.IncludeCode as Filter-import Text.Pandoc.JSON+import           Text.Pandoc.JSON +import           Paths_pandoc_include_code+ fails a =   a >>= \case     Left _ -> return ()@@ -25,12 +27,13 @@   -> [String]   -> [(String, String)]   -> IO (Either Filter.InclusionError Block)-includeCode fixtureName classes attrs =+includeCode fixtureName classes attrs = do+  fname <- getDataFileName ("test/fixtures/" ++ fixtureName)   Filter.includeCode'     (CodeBlock        ( ""        , classes-       , mconcat [[("include", "test/fixtures/" ++ fixtureName)], attrs])+       , mconcat [[("include", fname)], attrs])        "")  noRange = (Nothing, Nothing)
+ test/fixtures/foo-snippet.txt view
@@ -0,0 +1,3 @@+start snippet foo+foo+end snippet foo
+ test/fixtures/foo-snippets.txt view
@@ -0,0 +1,9 @@+// start snippet foo-other+foo-other+// end snippet foo-other++// (note the spaces after "foo" below, they are ok)++// start snippet foo+foo+// end snippet foo
+ test/fixtures/indents.txt view
@@ -0,0 +1,5 @@+zero+  two+ one+   three+        eight
+ test/fixtures/some-text.txt view
@@ -0,0 +1,5 @@+hello+world+this+is+text