From 32f9f35d89e41072543186969b995ac9aa020f98 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Mon, 18 Jul 2022 10:44:06 +0200 Subject: Fix final bug with laziness --- tests/commonmark.rs | 294 +++++++++++++++++++++++++--------------------------- 1 file changed, 142 insertions(+), 152 deletions(-) (limited to 'tests/commonmark.rs') diff --git a/tests/commonmark.rs b/tests/commonmark.rs index 1734004..503acca 100644 --- a/tests/commonmark.rs +++ b/tests/commonmark.rs @@ -999,20 +999,19 @@ of dashes"/> r###"Setext headings (91)"### ); -// To do: lazy setext underline bug. -// assert_eq!( -// micromark_with_options(r###"> foo -// bar -// === -// "###, DANGER), -// r###"
-//

foo -// bar -// ===

-//
-// "###, -// r###"Setext headings (92)"### -// ); + assert_eq!( + micromark_with_options(r###"> foo +bar +=== +"###, DANGER), + r###"
+

foo +bar +===

+
+"###, + r###"Setext headings (92)"### +); assert_eq!( micromark_with_options(r###"- Foo @@ -2797,20 +2796,19 @@ baz

r###"Block quotes (230)"### ); - // To do: some lazy bug. - // assert_eq!( - // micromark_with_options(r###"> # Foo - // > bar - // baz - // "###, DANGER), - // r###"
- //

Foo

- //

bar - // baz

- //
- // "###, - // r###"Block quotes (231)"### - // ); + assert_eq!( + micromark_with_options(r###"> # Foo +> bar +baz +"###, DANGER), + r###"
+

Foo

+

bar +baz

+
+"###, + r###"Block quotes (231)"### +); assert_eq!( micromark_with_options(r###"> bar @@ -2882,18 +2880,17 @@ foo r###"Block quotes (236)"### ); - // To do: some lazy bug. - // assert_eq!( - // micromark_with_options(r###"> foo - // - bar - // "###, DANGER), - // r###"
- //

foo - // - bar

- //
- // "###, - // r###"Block quotes (237)"### - // ); + assert_eq!( + micromark_with_options(r###"> foo + - bar +"###, DANGER), + r###"
+

foo +- bar

+
+"###, + r###"Block quotes (237)"### +); assert_eq!( micromark_with_options(r###"> @@ -2995,18 +2992,17 @@ bar

r###"Block quotes (245)"### ); - // To do: some lazy bug. - // assert_eq!( - // micromark_with_options(r###"> bar - // baz - // "###, DANGER), - // r###"
- //

bar - // baz

- //
- // "###, - // r###"Block quotes (246)"### - // ); + assert_eq!( + micromark_with_options(r###"> bar +baz +"###, DANGER), + r###"
+

bar +baz

+
+"###, + r###"Block quotes (246)"### +); assert_eq!( micromark_with_options(r###"> bar @@ -3034,41 +3030,39 @@ baz r###"Block quotes (248)"### ); - // To do: some lazy bug. - // assert_eq!( - // micromark_with_options(r###"> > > foo - // bar - // "###, DANGER), - // r###"
- //
- //
- //

foo - // bar

- //
- //
- //
- // "###, - // r###"Block quotes (249)"### - // ); + assert_eq!( + micromark_with_options(r###"> > > foo +bar +"###, DANGER), + r###"
+
+
+

foo +bar

+
+
+
+"###, + r###"Block quotes (249)"### +); - // To do: some lazy bug. - // assert_eq!( - // micromark_with_options(r###">>> foo - // > bar - // >>baz - // "###, DANGER), - // r###"
- //
- //
- //

foo - // bar - // baz

- //
- //
- //
- // "###, - // r###"Block quotes (250)"### - // ); + assert_eq!( + micromark_with_options(r###">>> foo +> bar +>>baz +"###, DANGER), + r###"
+
+
+

foo +bar +baz

+
+
+
+"###, + r###"Block quotes (250)"### +); assert_eq!( micromark_with_options(r###"> code @@ -3696,56 +3690,53 @@ with two lines.

r###"List items (289)"### ); - // To do: Some lazy bug. - // assert_eq!( - // micromark_with_options(r###" 1. A paragraph - // with two lines. - // "###, DANGER), - // r###"
    - //
  1. A paragraph - // with two lines.
  2. - //
- // "###, - // r###"List items (290)"### - // ); + assert_eq!( + micromark_with_options(r###" 1. A paragraph + with two lines. +"###, DANGER), + r###"
    +
  1. A paragraph +with two lines.
  2. +
+"###, + r###"List items (290)"### +); - // To do: Some lazy bug. - // assert_eq!( - // micromark_with_options(r###"> 1. > Blockquote - // continued here. - // "###, DANGER), - // r###"
- //
    - //
  1. - //
    - //

    Blockquote - // continued here.

    - //
    - //
  2. - //
- //
- // "###, - // r###"List items (291)"### - // ); + assert_eq!( + micromark_with_options(r###"> 1. > Blockquote +continued here. +"###, DANGER), + r###"
+
    +
  1. +
    +

    Blockquote +continued here.

    +
    +
  2. +
+
+"###, + r###"List items (291)"### +); - // To do: Some lazy bug. - // assert_eq!( - // micromark_with_options(r###"> 1. > Blockquote - // > continued here. - // "###, DANGER), - // r###"
- //
    - //
  1. - //
    - //

    Blockquote - // continued here.

    - //
    - //
  2. - //
- //
- // "###, - // r###"List items (292)"### - // ); + assert_eq!( + micromark_with_options(r###"> 1. > Blockquote +> continued here. +"###, DANGER), + r###"
+
    +
  1. +
    +

    Blockquote +continued here.

    +
    +
  2. +
+
+"###, + r###"List items (292)"### +); assert_eq!( micromark_with_options(r###"- foo @@ -4077,24 +4068,23 @@ baz r###"Lists (310)"### ); - // To do: Some interruption bug. - // assert_eq!( - // micromark_with_options(r###"- a - // - b - // - c - // - d - // - e - // "###, DANGER), - // r###" - // "###, - // r###"Lists (311)"### - // ); + assert_eq!( + micromark_with_options(r###"- a + - b + - c + - d + - e +"###, DANGER), + r###" +"###, + r###"Lists (311)"### +); assert_eq!( micromark_with_options(r###"1. a -- cgit