aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2016-07-02 10:52:49 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2016-07-03 23:28:45 +0200
commit5ffa4abf727779cee317aab81c143e3e2d3cb7d6 (patch)
tree2c9cfdc1e42a9d761d52d0991b0bc3022cfefa9e /tests
parentc1f6bd2640ba028af61ec51f744842350a53246b (diff)
downloadpandoc-5ffa4abf727779cee317aab81c143e3e2d3cb7d6.tar.gz
Org reader: support headline levels export setting
The depths of headlines can be modified using the `H` option. Deeper headlines will be converted to lists.
Diffstat (limited to 'tests')
-rw-r--r--tests/Tests/Readers/Org.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs
index f57858a55..fdd9bc6bf 100644
--- a/tests/Tests/Readers/Org.hs
+++ b/tests/Tests/Readers/Org.hs
@@ -611,6 +611,18 @@ tests =
] =?>
let tagSpan t = spanWith ("", ["tag"], [("data-tag-name", t)]) mempty
in headerWith ("old", [], mempty) 1 ("old" <> tagSpan "ARCHIVE")
+
+ , "Export option: limit headline depth" =:
+ unlines [ "#+OPTIONS: H:2"
+ , "* section"
+ , "** subsection"
+ , "*** list item 1"
+ , "*** list item 2"
+ ] =?>
+ mconcat [ headerWith ("section", [], []) 1 "section"
+ , headerWith ("subsection", [], []) 2 "subsection"
+ , orderedList [ para "list item 1", para "list item 2" ]
+ ]
]
, testGroup "Basic Blocks" $