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/gfm_task_list_item.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'tests/gfm_task_list_item.rs') diff --git a/tests/gfm_task_list_item.rs b/tests/gfm_task_list_item.rs index 66b646f..b824730 100644 --- a/tests/gfm_task_list_item.rs +++ b/tests/gfm_task_list_item.rs @@ -3,7 +3,7 @@ use micromark::{micromark, micromark_with_options, Constructs, Options}; use pretty_assertions::assert_eq; #[test] -fn gfm_task_list_item() { +fn gfm_task_list_item() -> Result<(), String> { let gfm = Options { constructs: Constructs::gfm(), ..Options::default() @@ -16,25 +16,25 @@ fn gfm_task_list_item() { ); assert_eq!( - micromark_with_options("* [x] y.", &gfm), + micromark_with_options("* [x] y.", &gfm)?, "", "should support task list item checks" ); assert_eq!( - micromark_with_options("* [ ] z.", &gfm), + micromark_with_options("* [ ] z.", &gfm)?, "", "should support unchecked task list item checks" ); assert_eq!( - micromark_with_options("*\n [x]", &gfm), + micromark_with_options("*\n [x]", &gfm)?, "", "should not support laziness (1)" ); assert_eq!( - micromark_with_options("*\n[x]", &gfm), + micromark_with_options("*\n[x]", &gfm)?, "\n

[x]

", "should not support laziness (2)" ); @@ -122,7 +122,7 @@ EOL after: .replace('␠', " ") .replace('␉', "\t"), &gfm - ), + )?, r###"