aboutsummaryrefslogtreecommitdiff
path: root/tests/Tests/Readers/Org.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-05-20 10:38:32 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2016-05-20 10:38:32 -0700
commit2e266b6a3a76f78554a67bf53f8fe7ac1d989f31 (patch)
tree8d92c51fddd1597e78f832587acd673bf897e657 /tests/Tests/Readers/Org.hs
parent0160e850173a4ec1c1b46ec1b871c3921041d282 (diff)
parentcd3282b08dc990f34e64048ed70a07dcbb6b8777 (diff)
downloadpandoc-2e266b6a3a76f78554a67bf53f8fe7ac1d989f31.tar.gz
Merge pull request #2934 from tarleb/org-properties-drawer
Org properties drawer
Diffstat (limited to 'tests/Tests/Readers/Org.hs')
-rw-r--r--tests/Tests/Readers/Org.hs19
1 files changed, 14 insertions, 5 deletions
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs
index 666d93a51..6f5a1bd50 100644
--- a/tests/Tests/Readers/Org.hs
+++ b/tests/Tests/Readers/Org.hs
@@ -412,17 +412,17 @@ tests =
] =?>
para "Before" <> para "After"
- , "Drawer start is the only text in first line of a drawer" =:
+ , "Drawer markers must be the only text in the line" =:
unlines [ " :LOGBOOK: foo"
- , " :END:"
+ , " :END: bar"
] =?>
- para (":LOGBOOK:" <> space <> "foo" <> softbreak <> ":END:")
+ para (":LOGBOOK: foo" <> softbreak <> ":END: bar")
- , "Drawers with unknown names are just text" =:
+ , "Drawers can be arbitrary" =:
unlines [ ":FOO:"
, ":END:"
] =?>
- para (":FOO:" <> softbreak <> ":END:")
+ (mempty::Blocks)
, "Anchor reference" =:
unlines [ "<<link-here>> Target."
@@ -597,6 +597,15 @@ tests =
, headerWith ("but-this-is", [], []) 2 "But this is"
]
+ , "Preferences are treated as header attributes" =:
+ unlines [ "* foo"
+ , " :PROPERTIES:"
+ , " :id: fubar"
+ , " :bar: baz"
+ , " :END:"
+ ] =?>
+ headerWith ("fubar", [], [("bar", "baz")]) 1 "foo"
+
, "Paragraph starting with an asterisk" =:
"*five" =?>
para "*five"