From c1b325a6dcf4bb8795dd2e5b2cdb1dcfcf61faf5 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Fri, 8 Jul 2022 13:26:23 +0200 Subject: Fix closing of flow when exiting containers --- tests/block_quote.rs | 26 ++++++++--------- tests/code_fenced.rs | 4 +-- tests/code_indented.rs | 11 ++++---- tests/definition.rs | 11 ++++---- tests/html_flow.rs | 77 +++++++++++++++++++++++--------------------------- 5 files changed, 59 insertions(+), 70 deletions(-) (limited to 'tests') diff --git a/tests/block_quote.rs b/tests/block_quote.rs index 02256e1..af9e9d9 100644 --- a/tests/block_quote.rs +++ b/tests/block_quote.rs @@ -47,12 +47,11 @@ fn block_quote() { "should support setext headings underlines in block quotes" ); - // To do: block quote (lazy, setext underline) - // assert_eq!( - // micromark("> a\n---"), - // "
\n

a

\n
\n
", - // "should not support lazy setext headings underlines in block quotes" - // ); + assert_eq!( + micromark("> a\n---"), + "
\n

a

\n
\n
", + "should not support lazy setext headings underlines in block quotes" + ); // To do: list. // assert_eq!( @@ -156,26 +155,25 @@ fn block_quote() { "should not support interrupting a blank line in a block quotes w/ paragraphs" ); - // To do: block quote (multi, lazy). + // To do: block quote (lazy). // assert_eq!( // micromark("> > > a\nb"), // "
\n
\n
\n

a\nb

\n
\n
\n
", // "should not support interrupting many block quotes w/ paragraphs (1)" // ); - // To do: block quote (multi, lazy). + // To do: block quote (lazy). // assert_eq!( // micromark(">>> a\n> b\n>>c"), // "
\n
\n
\n

a\nb\nc

\n
\n
\n
", // "should not support interrupting many block quotes w/ paragraphs (2)" // ); - // To do: block quote (exit flow if container exits). - // assert_eq!( - // micromark("> a\n\n> b"), - // "
\n
a\n
\n
\n
\n

b

\n
", - // "should support 5 spaces for indented code, not 4" - // ); + assert_eq!( + micromark("> a\n\n> b"), + "
\n
a\n
\n
\n
\n

b

\n
", + "should support 5 spaces for indented code, not 4" + ); // To do: turning things off. // assert_eq!( diff --git a/tests/code_fenced.rs b/tests/code_fenced.rs index 84d0d83..29ef62a 100644 --- a/tests/code_fenced.rs +++ b/tests/code_fenced.rs @@ -234,7 +234,7 @@ fn code_fenced() { // "should not support a closing sequence w/ too much indent, regardless of opening sequence (2)" // ); - // To do: blockquote (some bug). + // To do: blockquote (some bug, perhaps compiler). // assert_eq!( // micromark("> ```a\nb"), // "
\n
\n
\n

b

", @@ -247,7 +247,7 @@ fn code_fenced() { "should not support lazyness (2)" ); - // To do: blockquote (lazy). + // To do: blockquote (some bug, also compiler). // assert_eq!( // micromark("> ```a\n```"), // "
\n
\n
\n
\n", diff --git a/tests/code_indented.rs b/tests/code_indented.rs index d7cf181..ba1b483 100644 --- a/tests/code_indented.rs +++ b/tests/code_indented.rs @@ -76,12 +76,11 @@ fn code_indented() { "should support trailing whitespace" ); - // To do: blockquote (some bug). - // assert_eq!( - // micromark("> a\nb"), - // "
\n
a\n
\n
\n

b

", - // "should not support lazyness (1)" - // ); + assert_eq!( + micromark("> a\nb"), + "
\n
a\n
\n
\n

b

", + "should not support lazyness (1)" + ); // To do: blockquote (lazy). // assert_eq!( diff --git a/tests/definition.rs b/tests/definition.rs index ca8b97c..ffb3460 100644 --- a/tests/definition.rs +++ b/tests/definition.rs @@ -192,12 +192,11 @@ fn definition() { "should support definitions after definitions" ); - // To do: block quote (some bug). - // assert_eq!( - // micromark("> [foo]: /url\n\n[foo]"), - // "
\n
\n

foo

", - // "should support definitions in block quotes" - // ); + assert_eq!( + micromark("> [foo]: /url\n\n[foo]"), + "
\n
\n

foo

", + "should support definitions in block quotes" + ); // Extra assert_eq!( diff --git a/tests/html_flow.rs b/tests/html_flow.rs index 796ced4..71e7bbe 100644 --- a/tests/html_flow.rs +++ b/tests/html_flow.rs @@ -171,12 +171,11 @@ p {color:blue;} "should support blank lines in raw" ); - // To do: block quote (lazy). - // assert_eq!( - // micromark_with_options(">