diff options
Diffstat (limited to 'tests/Tests/Readers/Org.hs')
-rw-r--r-- | tests/Tests/Readers/Org.hs | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs index 6f5a1bd50..780053059 100644 --- a/tests/Tests/Readers/Org.hs +++ b/tests/Tests/Readers/Org.hs @@ -420,9 +420,10 @@ tests = , "Drawers can be arbitrary" =: unlines [ ":FOO:" + , "/bar/" , ":END:" ] =?> - (mempty::Blocks) + divWith (mempty, ["FOO", "drawer"], mempty) (para $ emph "bar") , "Anchor reference" =: unlines [ "<<link-here>> Target." @@ -475,6 +476,28 @@ tests = , "a^b" ] =?> para "a^b" + + , "Export option: directly select drawers to be exported" =: + unlines [ "#+OPTIONS: d:(\"IMPORTANT\")" + , ":IMPORTANT:" + , "23" + , ":END:" + , ":BORING:" + , "very boring" + , ":END:" + ] =?> + divWith (mempty, ["IMPORTANT", "drawer"], mempty) (para "23") + + , "Export option: exclude drawers from being exported" =: + unlines [ "#+OPTIONS: d:(not \"BORING\")" + , ":IMPORTANT:" + , "5" + , ":END:" + , ":BORING:" + , "very boring" + , ":END:" + ] =?> + divWith (mempty, ["IMPORTANT", "drawer"], mempty) (para "5") ] , testGroup "Basic Blocks" $ @@ -600,7 +623,7 @@ tests = , "Preferences are treated as header attributes" =: unlines [ "* foo" , " :PROPERTIES:" - , " :id: fubar" + , " :custom_id: fubar" , " :bar: baz" , " :END:" ] =?> |