diff options
Diffstat (limited to 'tests/Tests')
-rw-r--r-- | tests/Tests/Readers/Markdown.hs | 3 | ||||
-rw-r--r-- | tests/Tests/Readers/Org.hs | 27 | ||||
-rw-r--r-- | tests/Tests/Writers/LaTeX.hs | 2 |
3 files changed, 31 insertions, 1 deletions
diff --git a/tests/Tests/Readers/Markdown.hs b/tests/Tests/Readers/Markdown.hs index c24d2293f..f6afacb34 100644 --- a/tests/Tests/Readers/Markdown.hs +++ b/tests/Tests/Readers/Markdown.hs @@ -181,6 +181,9 @@ tests = [ testGroup "inline code" , "technically invalid comment" =: "<!-- pandoc --help -->" =?> rawBlock "html" "<!-- pandoc --help -->" + , test markdownGH "issue 2469" $ + "<\n\na>" =?> + para (text "<") <> para (text "a>") ] , "unbalanced brackets" =: "[[[[[[[[[[[[[[[hi" =?> para (text "[[[[[[[[[[[[[[[hi") diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs index b1aaaacad..66f284b28 100644 --- a/tests/Tests/Readers/Org.hs +++ b/tests/Tests/Readers/Org.hs @@ -264,6 +264,16 @@ tests = ) "echo 'Hello, World'") + , "Inline code block with toggle" =: + "src_sh[:toggle]{echo $HOME}" =?> + (para $ codeWith ( "" + , [ "bash", "rundoc-block" ] + , [ ("rundoc-language", "sh") + , ("rundoc-toggle", "yes") + ] + ) + "echo $HOME") + , "Citation" =: "[@nonexistent]" =?> let citation = Citation @@ -870,6 +880,14 @@ tests = , para "orange" , para "peach" ] + + , "Recognize preceding paragraphs in non-list contexts" =: + unlines [ "CLOSED: [2015-10-19 Mon 15:03]" + , "- Note taken on [2015-10-19 Mon 13:24]" + ] =?> + mconcat [ para "CLOSED: [2015-10-19 Mon 15:03]" + , bulletList [ plain "Note taken on [2015-10-19 Mon 13:24]" ] + ] ] , testGroup "Tables" @@ -1094,6 +1112,15 @@ tests = , ": 65" ] =?> rawBlock "html" "" + , "Source block with toggling header arguments" =: + unlines [ "#+BEGIN_SRC sh :noeval" + , "echo $HOME" + , "#+END_SRC" + ] =?> + let classes = [ "bash", "rundoc-block" ] + params = [ ("rundoc-language", "sh"), ("rundoc-noeval", "yes") ] + in codeBlockWith ("", classes, params) "echo $HOME\n" + , "Example block" =: unlines [ "#+begin_example" , "A chosen representation of" diff --git a/tests/Tests/Writers/LaTeX.hs b/tests/Tests/Writers/LaTeX.hs index d1cfd3ddf..27931dc28 100644 --- a/tests/Tests/Writers/LaTeX.hs +++ b/tests/Tests/Writers/LaTeX.hs @@ -42,7 +42,7 @@ tests = [ testGroup "code blocks" , testGroup "definition lists" [ "with internal link" =: definitionList [(link "#go" "" (str "testing"), [plain (text "hi there")])] =?> - "\\begin{description}\n\\tightlist\n\\item[{\\hyperref[go]{testing}}]\nhi there\n\\end{description}" + "\\begin{description}\n\\tightlist\n\\item[\\protect\\hyperlink{go}{testing}]\nhi there\n\\end{description}" ] , testGroup "math" [ "escape |" =: para (math "\\sigma|_{\\{x\\}}") =?> |