aboutsummaryrefslogtreecommitdiff
path: root/tests/Tests/Helpers.hs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Tests/Helpers.hs')
-rw-r--r--tests/Tests/Helpers.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/Tests/Helpers.hs b/tests/Tests/Helpers.hs
index af64f5148..b48c8af3a 100644
--- a/tests/Tests/Helpers.hs
+++ b/tests/Tests/Helpers.hs
@@ -20,6 +20,7 @@ import Text.Pandoc.Options
import Text.Pandoc.Writers.Native (writeNative)
import qualified Test.QuickCheck.Property as QP
import Data.Algorithm.Diff
+import qualified Data.Map as M
test :: (ToString a, ToString b, ToString c)
=> (a -> b) -- ^ function to test
@@ -58,8 +59,9 @@ class ToString a where
instance ToString Pandoc where
toString d = writeNative def{ writerStandalone = s } $ toPandoc d
where s = case d of
- (Pandoc (Meta [] [] []) _) -> False
- _ -> True
+ (Pandoc (Meta m) _)
+ | M.null m -> False
+ | otherwise -> True
instance ToString Blocks where
toString = writeNative def . toPandoc