diff options
Diffstat (limited to 'tests/mdx_jsx_flow.rs')
-rw-r--r-- | tests/mdx_jsx_flow.rs | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/tests/mdx_jsx_flow.rs b/tests/mdx_jsx_flow.rs index ff53dcb..9b0453f 100644 --- a/tests/mdx_jsx_flow.rs +++ b/tests/mdx_jsx_flow.rs @@ -33,12 +33,11 @@ fn mdx_jsx_flow_agnostic() -> Result<(), String> { "should support an element w/ containers as content" ); - // To do: expressions. - // assert_eq!( - // micromark_with_options("<a b c:d e=\"\" f={/* g */} {...h} />", &mdx)?, - // "", - // "should support attributes" - // ); + assert_eq!( + micromark_with_options("<a b c:d e=\"\" f={/* g */} {...h} />", &mdx)?, + "", + "should support attributes" + ); Ok(()) } @@ -97,7 +96,7 @@ fn mdx_jsx_flow_essence() -> Result<(), String> { ); assert_eq!( - micromark_with_options("> <a b='\nc'/> d", &mdx) + micromark_with_options("> <a b='\nc'/>", &mdx) .err() .unwrap(), "2:1: Unexpected lazy line in jsx in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc", @@ -105,7 +104,7 @@ fn mdx_jsx_flow_essence() -> Result<(), String> { ); assert_eq!( - micromark_with_options("> <a b='c\n'/> d", &mdx) + micromark_with_options("> <a b='c\n'/>", &mdx) .err() .unwrap(), "2:1: Unexpected lazy line in jsx in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc", @@ -113,7 +112,7 @@ fn mdx_jsx_flow_essence() -> Result<(), String> { ); assert_eq!( - micromark_with_options("> <a b='c\nd'/> e", &mdx) + micromark_with_options("> <a b='c\nd'/>", &mdx) .err() .unwrap(), "2:1: Unexpected lazy line in jsx in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc", @@ -121,9 +120,25 @@ fn mdx_jsx_flow_essence() -> Result<(), String> { ); assert_eq!( + micromark_with_options("> <a b={c\nd}/>", &mdx) + .err() + .unwrap(), + "2:1: Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc", + "should not support lazy flow (5)" + ); + + assert_eq!( + micromark_with_options("> <a {b\nc}/>", &mdx) + .err() + .unwrap(), + "2:1: Unexpected lazy line in expression in container, expected line to be prefixed with `>` when in a block quote, whitespace when in a list, etc", + "should not support lazy flow (6)" + ); + + assert_eq!( micromark_with_options("> a\n<X />", &mdx)?, "<blockquote>\n<p>a</p>\n</blockquote>\n", - "should not support lazy flow (5)" + "should not support lazy flow (7)" ); Ok(()) |