summaryrefslogtreecommitdiff
path: root/test/Tests/Readers
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2017-05-06 10:59:40 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2017-05-06 11:00:32 +0200
commitda8c153a6872a040440f8853a37f559bb3b26b02 (patch)
tree704c0e00947092cdda83cd74f7e211b072619743 /test/Tests/Readers
parent9f0a80457fb0ab343af651af8c7bc6f9dc467f55 (diff)
Org reader: support macros
Closes: #3401
Diffstat (limited to 'test/Tests/Readers')
-rw-r--r--test/Tests/Readers/Org.hs18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Tests/Readers/Org.hs b/test/Tests/Readers/Org.hs
index 7a7960396..278d91cfd 100644
--- a/test/Tests/Readers/Org.hs
+++ b/test/Tests/Readers/Org.hs
@@ -469,6 +469,24 @@ tests =
, citationNoteNum = 0
, citationHash = 0}
in (para . cite [citation] $ rawInline "latex" "\\cite{Coffee}")
+
+ , "Macro" =:
+ unlines [ "#+MACRO: HELLO /Hello, $1/"
+ , "{{{HELLO(World)}}}"
+ ] =?>
+ para (emph "Hello, World")
+
+ , "Macro repeting its argument" =:
+ unlines [ "#+MACRO: HELLO $1$1"
+ , "{{{HELLO(moin)}}}"
+ ] =?>
+ para "moinmoin"
+
+ , "Macro called with too few arguments" =:
+ unlines [ "#+MACRO: HELLO Foo $1 $2 Bar"
+ , "{{{HELLO()}}}"
+ ] =?>
+ para "Foo Bar"
]
, testGroup "Meta Information" $