summaryrefslogtreecommitdiff
path: root/test/Tests/Readers
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2017-05-27 15:24:01 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2017-05-27 15:38:08 +0200
commitbf93c07267bf138f4f4cab7625ff273fa2ac67cd (patch)
tree23214795499a342e9d52543ed98f9f2813f568b3 /test/Tests/Readers
parent8ec03cfc872d7ff58a2585740cecb4215313251a (diff)
Org reader: subject full doc tree to headline transformations
Emacs parses org documents into a tree structure, which is then post-processed during exporting. The reader is changed to do the same, turning the document into a single tree of headlines starting at levelĀ 0. Fixes: #3695
Diffstat (limited to 'test/Tests/Readers')
-rw-r--r--test/Tests/Readers/Org.hs18
1 files changed, 16 insertions, 2 deletions
diff --git a/test/Tests/Readers/Org.hs b/test/Tests/Readers/Org.hs
index eb5b68dc9..37ad2462b 100644
--- a/test/Tests/Readers/Org.hs
+++ b/test/Tests/Readers/Org.hs
@@ -708,16 +708,30 @@ tests =
, "limit headline depth" =:
unlines [ "#+OPTIONS: H:2"
- , "* section"
+ , "* top-level section"
, "** subsection"
, "*** list item 1"
, "*** list item 2"
] =?>
- mconcat [ headerWith ("section", [], []) 1 "section"
+ mconcat [ headerWith ("top-level-section", [], []) 1 "top-level section"
, headerWith ("subsection", [], []) 2 "subsection"
, orderedList [ para "list item 1", para "list item 2" ]
]
+ , "turn all headlines into lists" =:
+ unlines [ "#+OPTIONS: H:0"
+ , "first block"
+ , "* top-level section 1"
+ , "** subsection"
+ , "* top-level section 2"
+ ] =?>
+ mconcat [ para "first block"
+ , orderedList
+ [ (para "top-level section 1" <>
+ orderedList [ para "subsection" ])
+ , para "top-level section 2" ]
+ ]
+
, "disable author export" =:
unlines [ "#+OPTIONS: author:nil"
, "#+AUTHOR: ShyGuy"