diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-07-03 22:57:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-03 22:57:22 -0700 |
commit | e548b8df072c4eecfeb43f94c6517c35d5eba30c (patch) | |
tree | 93250a991695b6b4a3c19f805938955eb1b3d728 /tests/Tests | |
parent | 4099b2dca469b8683632c60b05474f5f2b25fb36 (diff) | |
parent | 5ffa4abf727779cee317aab81c143e3e2d3cb7d6 (diff) | |
download | pandoc-e548b8df072c4eecfeb43f94c6517c35d5eba30c.tar.gz |
Merge pull request #3010 from tarleb/org-header-tree
Org reader: support archived trees, headline levels export setting
Diffstat (limited to 'tests/Tests')
-rw-r--r-- | tests/Tests/Readers/Org.hs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs index 7612d88f1..fdd9bc6bf 100644 --- a/tests/Tests/Readers/Org.hs +++ b/tests/Tests/Readers/Org.hs @@ -587,6 +587,42 @@ tests = , ":END:" ] =?> divWith (mempty, ["IMPORTANT", "drawer"], mempty) (para "5") + + , "Export option: don't include archive trees" =: + unlines [ "#+OPTIONS: arch:nil" + , "* old :ARCHIVE:" + ] =?> + (mempty ::Blocks) + + , "Export option: include complete archive trees" =: + unlines [ "#+OPTIONS: arch:t" + , "* old :ARCHIVE:" + , " boring" + ] =?> + let tagSpan t = spanWith ("", ["tag"], [("data-tag-name", t)]) mempty + in mconcat [ headerWith ("old", [], mempty) 1 ("old" <> tagSpan "ARCHIVE") + , para "boring" + ] + + , "Export option: include archive tree header only" =: + unlines [ "#+OPTIONS: arch:headline" + , "* old :ARCHIVE:" + , " boring" + ] =?> + 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" $ |