aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Readers/Org
diff options
context:
space:
mode:
authorBrian Leung <bkleung89@gmail.com>2019-01-08 05:28:47 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2019-01-07 20:28:47 -0800
commit9dbcf1616158274b0a2c0000b0a6a261080f0006 (patch)
treeb14a45324ddd8c7e059994e7e777a45700904fb8 /test/Tests/Readers/Org
parentf9d9880325454e51948518d54e36cc6a6e91bde2 (diff)
downloadpandoc-9dbcf1616158274b0a2c0000b0a6a261080f0006.tar.gz
Org reader: handle `minlevel` option differently. (#5190)
When `minlevel` exceeds the original minimum level observed in the file to be included, every heading should be shifted rightward.
Diffstat (limited to 'test/Tests/Readers/Org')
-rw-r--r--test/Tests/Readers/Org/Directive.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/Tests/Readers/Org/Directive.hs b/test/Tests/Readers/Org/Directive.hs
index 87abb714d..bf4c2800d 100644
--- a/test/Tests/Readers/Org/Directive.hs
+++ b/test/Tests/Readers/Org/Directive.hs
@@ -192,10 +192,15 @@ tests =
headerWith ("level3", [], []) 3 "Level3")
, testWithFiles [("./level3.org", "*** Level3\n\n")]
- "Minlevel shifts level"
+ "Minlevel shifts level leftward"
(T.unlines [ "#+include: \"level3.org\" :minlevel 1" ] =?>
headerWith ("level3", [], []) 1 "Level3")
+ , testWithFiles [("./level1.org", "* Level1\n\n")]
+ "Minlevel shifts level rightward"
+ (T.unlines [ "#+include: \"level1.org\" :minlevel 3" ] =?>
+ headerWith ("level1", [], []) 3 "Level1")
+
, testWithFiles [("./src.hs", "putStrLn outString\n")]
"Include file as source code snippet"
(T.unlines [ "#+include: \"src.hs\" src haskell" ] =?>