aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/block_quote.rs12
-rw-r--r--tests/definition.rs6
-rw-r--r--tests/misc_line_ending.rs18
3 files changed, 21 insertions, 15 deletions
diff --git a/tests/block_quote.rs b/tests/block_quote.rs
index 70a6aeb..2f69bf5 100644
--- a/tests/block_quote.rs
+++ b/tests/block_quote.rs
@@ -124,6 +124,18 @@ fn block_quote() {
);
assert_eq!(
+ micromark("[a]\n\n> [a]: b"),
+ "<p><a href=\"b\">a</a></p>\n<blockquote>\n</blockquote>",
+ "should support a definition in a block quote (1)"
+ );
+
+ assert_eq!(
+ micromark("> [a]: b\n\n[a]"),
+ "<blockquote>\n</blockquote>\n<p><a href=\"b\">a</a></p>",
+ "should support a definition in a block quote (2)"
+ );
+
+ assert_eq!(
micromark("a\n> b"),
"<p>a</p>\n<blockquote>\n<p>b</p>\n</blockquote>",
"should support interrupting paragraphs w/ block quotes"
diff --git a/tests/definition.rs b/tests/definition.rs
index 27c1fed..5fee153 100644
--- a/tests/definition.rs
+++ b/tests/definition.rs
@@ -228,6 +228,12 @@ fn definition() {
"should support definitions in block quotes (2)"
);
+ assert_eq!(
+ micromark("> [a]\n\n[a]: b (c\n)"),
+ "<blockquote>\n<p><a href=\"b\" title=\"c\n\">a</a></p>\n</blockquote>\n",
+ "should support definitions in block quotes (3)"
+ );
+
// Extra
assert_eq!(
micromark("[\\[\\+\\]]: example.com\n\nLink: [\\[\\+\\]]."),
diff --git a/tests/misc_line_ending.rs b/tests/misc_line_ending.rs
index 3d8934d..a8d122e 100644
--- a/tests/misc_line_ending.rs
+++ b/tests/misc_line_ending.rs
@@ -9,17 +9,9 @@ fn line_ending() {
..Options::default()
};
- assert_eq!(
- micromark("\n"),
- "",
- "should support just a line feed"
- );
+ assert_eq!(micromark("\n"), "", "should support just a line feed");
- assert_eq!(
- micromark("\r"),
- "",
- "should support just a carriage return"
- );
+ assert_eq!(micromark("\r"), "", "should support just a carriage return");
assert_eq!(
micromark("\r\n"),
@@ -27,11 +19,7 @@ fn line_ending() {
"should support just a carriage return + line feed"
);
- assert_eq!(
- micromark("\n\n"),
- "",
- "should support just two line feeds"
- );
+ assert_eq!(micromark("\n\n"), "", "should support just two line feeds");
assert_eq!(
micromark("\r\r"),