From 1d92666865b35341e076efbefddf6e73b5e1542e Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Wed, 7 Sep 2022 15:53:06 +0200 Subject: Add support for recoverable syntax errors --- tests/misc_tabs.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'tests/misc_tabs.rs') diff --git a/tests/misc_tabs.rs b/tests/misc_tabs.rs index 138aa7b..feb8177 100644 --- a/tests/misc_tabs.rs +++ b/tests/misc_tabs.rs @@ -3,7 +3,7 @@ use micromark::{micromark, micromark_with_options, Options}; use pretty_assertions::assert_eq; #[test] -fn tabs_flow() { +fn tabs_flow() -> Result<(), String> { let danger = &Options { allow_dangerous_html: true, ..Options::default() @@ -112,7 +112,7 @@ fn tabs_flow() { ); assert_eq!( - micromark_with_options("", danger), + micromark_with_options("", danger)?, "", "should support tabs in HTML (if whitespace is allowed)" ); @@ -128,10 +128,12 @@ fn tabs_flow() { "
", "should support arbitrary tabs in thematic breaks" ); + + Ok(()) } #[test] -fn tabs_text() { +fn tabs_text() -> Result<(), String> { assert_eq!( micromark(""), "

<http:\t>

", @@ -249,10 +251,12 @@ fn tabs_text() { "

x

", "should support a tab between a link destination and title" ); + + Ok(()) } #[test] -fn tabs_virtual_spaces() { +fn tabs_virtual_spaces() -> Result<(), String> { assert_eq!( micromark("```\n\tx"), "
\tx\n
\n", @@ -284,4 +288,6 @@ fn tabs_virtual_spaces() { // "
    \n
  • \n

    a

    \n

    b

    \n
  • \n
", "should support a part of a tab as a container, and the rest of a tab as flow" ); + + Ok(()) } -- cgit