aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlbert Krewinkel <tarleb@moltkeplatz.de>2014-05-09 18:07:37 +0200
committerAlbert Krewinkel <tarleb@moltkeplatz.de>2014-05-09 18:08:30 +0200
commit757c4f68f3f3cab99db9499936e3ae4775ebbddf (patch)
tree8708fbaea81f9b445831125cc1c6b33786575e15 /tests
parent7760504bb26f215e7d0c57da843f1f1dcc8c1186 (diff)
downloadpandoc-757c4f68f3f3cab99db9499936e3ae4775ebbddf.tar.gz
Org reader: Support arguments for code blocks
The general form of source block headers (`#+BEGIN_SRC <language> <switches> <header arguments>`) was not recognized by the reader. This patch adds support for the above form, adds header arguments to the block's key-value pairs and marks the block as a rundoc block if header arguments are present. This closes #1286.
Diffstat (limited to 'tests')
-rw-r--r--tests/Tests/Readers/Org.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs
index 949976aba..a78e8861f 100644
--- a/tests/Tests/Readers/Org.hs
+++ b/tests/Tests/Readers/Org.hs
@@ -822,6 +822,20 @@ tests =
in mconcat [ para $ spcSep [ "Low", "German", "greeting" ]
, codeBlockWith attr' code'
]
+ , "Source block with rundoc/babel arguments" =:
+ unlines [ "#+BEGIN_SRC emacs-lisp :exports both"
+ , "(progn (message \"Hello, World!\")"
+ , " (+ 23 42))"
+ , "#+END_SRC" ] =?>
+ let classes = [ "commonlisp" -- as kate doesn't know emacs-lisp syntax
+ , "rundoc-block"
+ ]
+ params = [ ("rundoc-language", "emacs-lisp")
+ , ("rundoc-exports", "both")
+ ]
+ code' = unlines [ "(progn (message \"Hello, World!\")"
+ , " (+ 23 42))" ]
+ in codeBlockWith ("", classes, params) code'
, "Example block" =:
unlines [ "#+begin_example"