aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Readers/Org/Directive.hs
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2019-05-13 22:25:04 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2019-05-13 22:25:04 +0200
commit00ef03827e4ab77a1213b2adf261c818ddae076d (patch)
tree2c8036d1236e3b184278bf9400bdab6e31ce91d9 /test/Tests/Readers/Org/Directive.hs
parent1d033a26918e1117bef6fe1629571179a27c861c (diff)
downloadpandoc-00ef03827e4ab77a1213b2adf261c818ddae076d.tar.gz
Org reader: omit, but warn about unknown export options
Unknown export options are properly ignored and omitted from the output.
Diffstat (limited to 'test/Tests/Readers/Org/Directive.hs')
-rw-r--r--test/Tests/Readers/Org/Directive.hs18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Tests/Readers/Org/Directive.hs b/test/Tests/Readers/Org/Directive.hs
index 6d6609d4e..d8a8a8733 100644
--- a/test/Tests/Readers/Org/Directive.hs
+++ b/test/Tests/Readers/Org/Directive.hs
@@ -184,6 +184,24 @@ tests =
] =?>
headerWith ("wichtig", mempty, mempty) 1 "Wichtig"
]
+
+ , testGroup "unknown options"
+ [ "unknown options are ignored" =:
+ T.unlines [ "#+OPTIONS: does-not-exist:t "] =?>
+ (mempty :: Pandoc)
+
+ , "highlighting after unknown option" =:
+ T.unlines [ "#+OPTIONS: nope"
+ , "/yup/"
+ ] =?>
+ para (emph "yup")
+
+ , "unknown option interleaved with known" =:
+ T.unlines [ "#+OPTIONS: tags:nil foo:bar todo:nil"
+ , "* DONE ignore things :easy:"
+ ] =?>
+ headerWith ("ignore-things", [], mempty) 1 "ignore things"
+ ]
]
, testGroup "Include"