From 5403261e8213f68633a09fc3e9bc2e6e2cd777b2 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Mon, 18 Jul 2022 16:31:14 +0200 Subject: Add support for turning off constructs --- tests/misc_line_ending.rs | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'tests/misc_line_ending.rs') diff --git a/tests/misc_line_ending.rs b/tests/misc_line_ending.rs index 195ddaa..f6dbccd 100644 --- a/tests/misc_line_ending.rs +++ b/tests/misc_line_ending.rs @@ -1,14 +1,14 @@ extern crate micromark; use micromark::{micromark, micromark_with_options, Options}; -const DANGER: &Options = &Options { - allow_dangerous_html: true, - allow_dangerous_protocol: true, - default_line_ending: None, -}; - #[test] fn line_ending() { + let danger = &Options { + allow_dangerous_html: true, + allow_dangerous_protocol: true, + ..Options::default() + }; + assert_eq!( micromark("a\nb"), "

a\nb

", @@ -106,55 +106,55 @@ 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" ); -- cgit