diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-05-09 09:51:19 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-05-09 09:51:19 -0700 |
commit | c092a97132e9dc5c654e0e9d077014332fbdc4bc (patch) | |
tree | b24e06d60092d73e1ba45851e16c732d5b0c105d /tests/Tests/Readers | |
parent | 8afbd7e66499c4c9a24b225d3af01d353e0876ca (diff) | |
parent | 07694b30184bcf2ed0e2998016df394f47a1996f (diff) | |
download | pandoc-c092a97132e9dc5c654e0e9d077014332fbdc4bc.tar.gz |
Merge pull request #1289 from tarleb/code-block-headers
Org reader: Support code block headers, fix reading of block content
Diffstat (limited to 'tests/Tests/Readers')
-rw-r--r-- | tests/Tests/Readers/Org.hs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs index 949976aba..87b0d0c90 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" @@ -906,5 +920,14 @@ tests = (unlines [ "fmap id = id" , "fmap (p . q) = (fmap p) . (fmap q)" ]))) + + , "Convert blank lines in blocks to single newlines" =: + unlines [ "#+begin_html" + , "" + , "<span>boring</span>" + , "" + , "#+end_html" + ] =?> + rawBlock "html" "\n<span>boring</span>\n\n" ] ] |