aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Writers/RST.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Tests/Writers/RST.hs b/test/Tests/Writers/RST.hs
index a1a4510e0..0d5b7c38a 100644
--- a/test/Tests/Writers/RST.hs
+++ b/test/Tests/Writers/RST.hs
@@ -16,6 +16,11 @@ infix 4 =:
=> String -> (a, String) -> TestTree
(=:) = test (purely (writeRST def . toPandoc))
+testTemplate :: (ToString a, ToString c, ToPandoc a) =>
+ String -> String -> (a, c) -> TestTree
+testTemplate t =
+ test (purely (writeRST def{ writerTemplate = Just t }) . toPandoc)
+
tests :: [TestTree]
tests = [ testGroup "rubrics"
[ "in list item" =:
@@ -156,4 +161,7 @@ tests = [ testGroup "rubrics"
, "Header 2"
, "--------"]
]
+ , testTemplate "$subtitle$\n" "subtitle" $
+ (setMeta "subtitle" ("subtitle" :: Inlines) $ doc $ plain "") =?>
+ ("subtitle" :: String)
]