diff options
Diffstat (limited to '')
-rw-r--r-- | tests/character_reference.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/character_reference.rs b/tests/character_reference.rs index c388514..a08c3f9 100644 --- a/tests/character_reference.rs +++ b/tests/character_reference.rs @@ -3,11 +3,10 @@ use micromark::{micromark, micromark_with_options, Constructs, Options}; use pretty_assertions::assert_eq; #[test] -fn character_reference() { +fn character_reference() -> Result<(), String> { assert_eq!( micromark( - " & © Æ Ď\n¾ ℋ ⅆ\n∲ ≧̸" - ), + " & © Æ Ď\n¾ ℋ ⅆ\n∲ ≧̸"), "<p>\u{a0} & © Æ Ď\n¾ ℋ ⅆ\n∲ ≧̸</p>", "should support named character references" ); @@ -26,8 +25,7 @@ fn character_reference() { assert_eq!( micromark( - "  &x; &#; &#x;\n�\n&#abcdef0;\n&ThisIsNotDefined; &hi?;" - ), + "  &x; &#; &#x;\n�\n&#abcdef0;\n&ThisIsNotDefined; &hi?;"), "<p>&nbsp &x; &#; &#x;\n&#987654321;\n&#abcdef0;\n&ThisIsNotDefined; &hi?;</p>", "should not support other things that look like character references" ); @@ -51,7 +49,7 @@ fn character_reference() { allow_dangerous_html: true, ..Options::default() } - ), + )?, "<a href=\"öö.html\">", "should not care about character references in html" ); @@ -199,8 +197,10 @@ fn character_reference() { }, ..Options::default() } - ), + )?, "<p>&amp;</p>", "should support turning off character references" ); + + Ok(()) } |