aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/block_quote.rs55
-rw-r--r--tests/character_escape.rs6
-rw-r--r--tests/code_indented.rs44
-rw-r--r--tests/heading_atx.rs10
-rw-r--r--tests/heading_setext.rs33
-rw-r--r--tests/html_flow.rs14
-rw-r--r--tests/thematic_break.rs10
7 files changed, 81 insertions, 91 deletions
diff --git a/tests/block_quote.rs b/tests/block_quote.rs
index c0b10b7..a448ece 100644
--- a/tests/block_quote.rs
+++ b/tests/block_quote.rs
@@ -27,19 +27,17 @@ fn block_quote() {
"should not support block quotes w/ 4 spaces"
);
- // To do: block quote (lazy).
- // assert_eq!(
- // micromark("> # a\n> b\nc"),
- // "<blockquote>\n<h1>a</h1>\n<p>b\nc</p>\n</blockquote>",
- // "should support lazy content lines"
- // );
+ assert_eq!(
+ micromark("> # a\n> b\nc"),
+ "<blockquote>\n<h1>a</h1>\n<p>b\nc</p>\n</blockquote>",
+ "should support lazy content lines"
+ );
- // To do: block quote (lazy).
- // assert_eq!(
- // micromark("> a\nb\n> c"),
- // "<blockquote>\n<p>a\nb\nc</p>\n</blockquote>",
- // "should support lazy content lines inside block quotes"
- // );
+ assert_eq!(
+ micromark("> a\nb\n> c"),
+ "<blockquote>\n<p>a\nb\nc</p>\n</blockquote>",
+ "should support lazy content lines inside block quotes"
+ );
assert_eq!(
micromark("> a\n> ---"),
@@ -134,12 +132,11 @@ fn block_quote() {
"should support interrupting block quotes w/ thematic breaks"
);
- // To do: block quote (lazy).
- // assert_eq!(
- // micromark("> a\nb"),
- // "<blockquote>\n<p>a\nb</p>\n</blockquote>",
- // "should not support interrupting block quotes w/ paragraphs"
- // );
+ assert_eq!(
+ micromark("> a\nb"),
+ "<blockquote>\n<p>a\nb</p>\n</blockquote>",
+ "should not support interrupting block quotes w/ paragraphs"
+ );
assert_eq!(
micromark("> a\n\nb"),
@@ -153,19 +150,17 @@ fn block_quote() {
"should not support interrupting a blank line in a block quotes w/ paragraphs"
);
- // To do: block quote (lazy).
- // assert_eq!(
- // micromark("> > > a\nb"),
- // "<blockquote>\n<blockquote>\n<blockquote>\n<p>a\nb</p>\n</blockquote>\n</blockquote>\n</blockquote>",
- // "should not support interrupting many block quotes w/ paragraphs (1)"
- // );
+ assert_eq!(
+ micromark("> > > a\nb"),
+ "<blockquote>\n<blockquote>\n<blockquote>\n<p>a\nb</p>\n</blockquote>\n</blockquote>\n</blockquote>",
+ "should not support interrupting many block quotes w/ paragraphs (1)"
+ );
- // To do: block quote (lazy).
- // assert_eq!(
- // micromark(">>> a\n> b\n>>c"),
- // "<blockquote>\n<blockquote>\n<blockquote>\n<p>a\nb\nc</p>\n</blockquote>\n</blockquote>\n</blockquote>",
- // "should not support interrupting many block quotes w/ paragraphs (2)"
- // );
+ assert_eq!(
+ micromark(">>> a\n> b\n>>c"),
+ "<blockquote>\n<blockquote>\n<blockquote>\n<p>a\nb\nc</p>\n</blockquote>\n</blockquote>\n</blockquote>",
+ "should not support interrupting many block quotes w/ paragraphs (2)"
+ );
assert_eq!(
micromark("> a\n\n> b"),
diff --git a/tests/character_escape.rs b/tests/character_escape.rs
index 6200014..d27f20a 100644
--- a/tests/character_escape.rs
+++ b/tests/character_escape.rs
@@ -79,10 +79,10 @@ fn character_escape() {
"should escape in fenced code info"
);
- // // To do: turning things off
- // assert_eq!(
+ // To do: turning things off
+ // assert_eq!(
// micromark("\\> a", {extensions: [{disable: {null: ["characterEscape"]}}]}),
// "<p>\\&gt; a</p>",
// "should support turning off character escapes"
- // );
+ // );
}
diff --git a/tests/code_indented.rs b/tests/code_indented.rs
index f462792..10281a2 100644
--- a/tests/code_indented.rs
+++ b/tests/code_indented.rs
@@ -16,11 +16,12 @@ fn code_indented() {
// "should prefer list item content over indented code (1)"
// );
- // assert_eq!(
- // micromark("1. foo\n\n - bar"),
- // "<ol>\n<li>\n<p>foo</p>\n<ul>\n<li>bar</li>\n</ul>\n</li>\n</ol>",
- // "should prefer list item content over indented code (2)"
- // );
+ // To do: list.
+ // assert_eq!(
+ // micromark("1. foo\n\n - bar"),
+ // "<ol>\n<li>\n<p>foo</p>\n<ul>\n<li>bar</li>\n</ul>\n</li>\n</ol>",
+ // "should prefer list item content over indented code (2)"
+ // );
assert_eq!(
micromark(" <a/>\n *hi*\n\n - one"),
@@ -82,26 +83,23 @@ fn code_indented() {
"should not support lazyness (1)"
);
- // To do: blockquote (lazy).
- // assert_eq!(
- // micromark("> a\n b"),
- // "<blockquote>\n<p>a\nb</p>\n</blockquote>",
- // "should not support lazyness (2)"
- // );
+ assert_eq!(
+ micromark("> a\n b"),
+ "<blockquote>\n<p>a\nb</p>\n</blockquote>",
+ "should not support lazyness (2)"
+ );
- // To do: blockquote (lazy).
- // assert_eq!(
- // micromark("> a\n b"),
- // "<blockquote>\n<p>a\nb</p>\n</blockquote>",
- // "should not support lazyness (3)"
- // );
+ assert_eq!(
+ micromark("> a\n b"),
+ "<blockquote>\n<p>a\nb</p>\n</blockquote>",
+ "should not support lazyness (3)"
+ );
- // To do: blockquote (lazy).
- // assert_eq!(
- // micromark("> a\n b"),
- // "<blockquote>\n<p>a\nb</p>\n</blockquote>",
- // "should not support lazyness (4)"
- // );
+ assert_eq!(
+ micromark("> a\n b"),
+ "<blockquote>\n<p>a\nb</p>\n</blockquote>",
+ "should not support lazyness (4)"
+ );
assert_eq!(
micromark("> a\n b"),
diff --git a/tests/heading_atx.rs b/tests/heading_atx.rs
index b7c87fe..530ddc5 100644
--- a/tests/heading_atx.rs
+++ b/tests/heading_atx.rs
@@ -188,11 +188,11 @@ fn heading_atx() {
"should not support lazyness (1)"
);
- // assert_eq!(
- // micromark("> a\n#"),
- // "<blockquote>\n<p>a</p>\n</blockquote>\n<h1></h1>",
- // "should not support lazyness (2)"
- // );
+ assert_eq!(
+ micromark("> a\n#"),
+ "<blockquote>\n<p>a</p>\n</blockquote>\n<h1></h1>",
+ "should not support lazyness (2)"
+ );
// To do: turning things off:
// assert_eq!(
diff --git a/tests/heading_setext.rs b/tests/heading_setext.rs
index a42b8e5..0e0c34c 100644
--- a/tests/heading_setext.rs
+++ b/tests/heading_setext.rs
@@ -135,12 +135,11 @@ fn heading_setext() {
"should not allow underline to be lazy (1)"
);
- // To do: block quote (lazy).
- // assert_eq!(
- // micromark("> foo\nbar\n==="),
- // "<blockquote>\n<p>foo\nbar\n===</p>\n</blockquote>",
- // "should not allow underline to be lazy (2)"
- // );
+ assert_eq!(
+ micromark("> foo\nbar\n==="),
+ "<blockquote>\n<p>foo\nbar\n===</p>\n</blockquote>",
+ "should not allow underline to be lazy (2)"
+ );
// To do: list.
// assert_eq!(
@@ -247,19 +246,17 @@ fn heading_setext() {
"should prefer a setext heading over an interrupting list"
);
- // To do: block quote (lazy).
- // assert_eq!(
- // micromark("> ===\na"),
- // "<blockquote>\n<p>===\na</p>\n</blockquote>",
- // "should not support lazyness (1)"
- // );
+ assert_eq!(
+ micromark("> ===\na"),
+ "<blockquote>\n<p>===\na</p>\n</blockquote>",
+ "should not support lazyness (1)"
+ );
- // To do: block quote (lazy).
- // assert_eq!(
- // micromark("> a\n==="),
- // "<blockquote>\n<p>a\n===</p>\n</blockquote>",
- // "should not support lazyness (2)"
- // );
+ assert_eq!(
+ micromark("> a\n==="),
+ "<blockquote>\n<p>a\n===</p>\n</blockquote>",
+ "should not support lazyness (2)"
+ );
// To do: turning things off.
// assert_eq!(
diff --git a/tests/html_flow.rs b/tests/html_flow.rs
index 6dfceb5..1f88dbc 100644
--- a/tests/html_flow.rs
+++ b/tests/html_flow.rs
@@ -385,13 +385,13 @@ fn html_flow_4_declaration() {
#[test]
fn html_flow_5_cdata() {
assert_eq!(
- micromark_with_options(
- "<![CDATA[\nfunction matchwo(a,b)\n{\n if (a < b && a < 0) then {\n return 1;\n\n } else {\n\n return 0;\n }\n}\n]]>\nokay",
- DANGER
- ),
- "<![CDATA[\nfunction matchwo(a,b)\n{\n if (a < b && a < 0) then {\n return 1;\n\n } else {\n\n return 0;\n }\n}\n]]>\n<p>okay</p>",
- "should support cdata (type 5)"
- );
+ micromark_with_options(
+ "<![CDATA[\nfunction matchwo(a,b)\n{\n if (a < b && a < 0) then {\n return 1;\n\n } else {\n\n return 0;\n }\n}\n]]>\nokay",
+ DANGER
+ ),
+ "<![CDATA[\nfunction matchwo(a,b)\n{\n if (a < b && a < 0) then {\n return 1;\n\n } else {\n\n return 0;\n }\n}\n]]>\n<p>okay</p>",
+ "should support cdata (type 5)"
+ );
assert_eq!(
micromark_with_options("<![CDATA[]]>", DANGER),
diff --git a/tests/thematic_break.rs b/tests/thematic_break.rs
index 7a15c32..61fee72 100644
--- a/tests/thematic_break.rs
+++ b/tests/thematic_break.rs
@@ -161,11 +161,11 @@ fn thematic_break() {
"should not support lazyness (1)"
);
- // assert_eq!(
- // micromark("> a\n---"),
- // "<blockquote>\n<p>a</p>\n</blockquote>\n<hr />",
- // "should not support lazyness (2)"
- // );
+ assert_eq!(
+ micromark("> a\n---"),
+ "<blockquote>\n<p>a</p>\n</blockquote>\n<hr />",
+ "should not support lazyness (2)"
+ );
// To do: turning things off.
// assert_eq!(