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_line_ending.rs | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'tests/misc_line_ending.rs') diff --git a/tests/misc_line_ending.rs b/tests/misc_line_ending.rs index d8334d8..6713b32 100644 --- a/tests/misc_line_ending.rs +++ b/tests/misc_line_ending.rs @@ -3,7 +3,7 @@ use micromark::{micromark, micromark_with_options, Options}; use pretty_assertions::assert_eq; #[test] -fn line_ending() { +fn line_ending() -> Result<(), String> { let danger = &Options { allow_dangerous_html: true, allow_dangerous_protocol: true, @@ -131,56 +131,58 @@ fn line_ending() { ); assert_eq!( - micromark_with_options("\n\nx", danger), + micromark_with_options("
\n\nx", danger)?, "
\n

x

", "should support a blank line w/ line feeds after html" ); assert_eq!( - micromark_with_options("
\r\rx", danger), + micromark_with_options("
\r\rx", danger)?, "
\r

x

", "should support a blank line w/ carriage returns after html" ); assert_eq!( - micromark_with_options("
\r\n\r\nx", danger), + micromark_with_options("
\r\n\r\nx", danger)?, "
\r\n

x

", "should support a blank line w/ carriage return + line feeds after html" ); assert_eq!( - micromark_with_options("
\nx", danger), + micromark_with_options("
\nx", danger)?, "
\nx", "should support a non-blank line w/ line feed in html" ); assert_eq!( - micromark_with_options("
\rx", danger), + micromark_with_options("
\rx", danger)?, "
\rx", "should support a non-blank line w/ carriage return in html" ); assert_eq!( - micromark_with_options("
\r\nx", danger), + micromark_with_options("
\r\nx", danger)?, "
\r\nx", "should support a non-blank line w/ carriage return + line feed in html" ); + + Ok(()) } -- cgit