aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOphir Lifshitz <hangfromthefloor@gmail.com>2015-07-23 02:31:24 -0400
committerOphir Lifshitz <hangfromthefloor@gmail.com>2015-07-23 02:31:24 -0400
commit53cb926232e23af32866255d4ecad518f8f972f5 (patch)
tree46b3859c4de6c9facd574979b52a71b3429217d4 /tests
parent0c7d0757d6d69403fdcf5bc0fba2e6c0dfbf8b6e (diff)
downloadpandoc-53cb926232e23af32866255d4ecad518f8f972f5.tar.gz
Markdown Reader: Add basic tests for each header style
Diffstat (limited to 'tests')
-rw-r--r--tests/Tests/Readers/Markdown.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/Tests/Readers/Markdown.hs b/tests/Tests/Readers/Markdown.hs
index 78891ab54..d5ad07a18 100644
--- a/tests/Tests/Readers/Markdown.hs
+++ b/tests/Tests/Readers/Markdown.hs
@@ -224,6 +224,16 @@ tests = [ testGroup "inline code"
, "bracketed text (#2062)" =:
"# [hi]\n"
=?> headerWith ("hi",[],[]) 1 "[hi]"
+ , "ATX header without trailing #s" =:
+ "# Foo bar\n\n" =?>
+ headerWith ("foo-bar",[],[]) 1 "Foo bar"
+ , "ATX header without trailing #s" =:
+ "# Foo bar with # #" =?>
+ headerWith ("foo-bar-with",[],[]) 1 "Foo bar with #"
+ , "setext header" =:
+ "Foo bar\n=\n\n Foo bar 2 \n=" =?>
+ headerWith ("foo-bar",[],[]) 1 "Foo bar"
+ <> headerWith ("foo-bar-2",[],[]) 1 "Foo bar 2"
]
, testGroup "Implicit header references"
[ "ATX header without trailing #s" =: