From 00ef03827e4ab77a1213b2adf261c818ddae076d Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Mon, 13 May 2019 22:25:04 +0200 Subject: Org reader: omit, but warn about unknown export options Unknown export options are properly ignored and omitted from the output. --- test/Tests/Readers/Org/Directive.hs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'test/Tests/Readers/Org') 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" -- cgit v1.2.3