diff options
Diffstat (limited to '')
-rw-r--r-- | tests/block_quote.rs | 12 | ||||
-rw-r--r-- | tests/gfm_task_list_item.rs | 6 | ||||
-rw-r--r-- | tests/list.rs | 12 |
3 files changed, 30 insertions, 0 deletions
diff --git a/tests/block_quote.rs b/tests/block_quote.rs index 5c72fb9..be9da40 100644 --- a/tests/block_quote.rs +++ b/tests/block_quote.rs @@ -89,6 +89,18 @@ fn block_quote() { ); assert_eq!( + micromark("> [\na"), + "<blockquote>\n<p>[\na</p>\n</blockquote>", + "should support lazy, definition-like lines" + ); + + assert_eq!( + micromark("> [a]: b\nc"), + "<blockquote>\n<p>c</p>\n</blockquote>", + "should support a definition, followed by a lazy paragraph" + ); + + assert_eq!( micromark(">"), "<blockquote>\n</blockquote>", "should support empty block quotes (1)" diff --git a/tests/gfm_task_list_item.rs b/tests/gfm_task_list_item.rs index 5db5d1b..66b646f 100644 --- a/tests/gfm_task_list_item.rs +++ b/tests/gfm_task_list_item.rs @@ -70,6 +70,9 @@ fn gfm_task_list_item() { + [X] With an upper case `x` +* [ +] In a lazy line + - [ ] With two spaces + [x] Two spaces indent @@ -163,6 +166,9 @@ EOL after: <li><input type="checkbox" disabled="" checked="" /> With an upper case <code>x</code></li> </ul> <ul> +<li><input type="checkbox" disabled="" /> In a lazy line</li> +</ul> +<ul> <li>[ ] With two spaces</li> </ul> <ul> diff --git a/tests/list.rs b/tests/list.rs index fc416cc..bbba7cd 100644 --- a/tests/list.rs +++ b/tests/list.rs @@ -262,6 +262,18 @@ fn list() { ); assert_eq!( + micromark("- [\na"), + "<ul>\n<li>[\na</li>\n</ul>", + "should support lazy, definition-like lines" + ); + + assert_eq!( + micromark("- [a]: b\nc"), + "<ul>\n<li>c</li>\n</ul>", + "should support a definition, followed by a lazy paragraph" + ); + + assert_eq!( micromark("- foo\n - bar\n - baz\n - boo"), "<ul>\n<li>foo\n<ul>\n<li>bar\n<ul>\n<li>baz\n<ul>\n<li>boo</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>", "should support sublists w/ enough spaces (1)" |