diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-05-23 10:39:08 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-05-23 10:39:08 -0700 |
commit | 654bdf72bfe608cea1b606028a4bf9570bb63b8f (patch) | |
tree | d5c54ecb01c1d743673544d05d87ef4cedafaaca /tests/Tests/Readers/Org.hs | |
parent | e3ca9793aa1d495ad6070ba63cb91311ec69132e (diff) | |
parent | 5667e0959a09035e155beaa1432c48828c4e9396 (diff) |
Merge pull request #2941 from tarleb/org-drawer-improvements
Org drawer improvements
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:" ] =?> |