diff options
Diffstat (limited to 'tests/image.rs')
-rw-r--r-- | tests/image.rs | 55 |
1 files changed, 25 insertions, 30 deletions
diff --git a/tests/image.rs b/tests/image.rs index 6db6d75..32d4171 100644 --- a/tests/image.rs +++ b/tests/image.rs @@ -14,12 +14,11 @@ fn image() { "should support image w/ resource" ); - // To do: attention. - // assert_eq!( - // micromark("[foo *bar*]: train.jpg \"train & tracks\"\n\n![foo *bar*]"), - // "<p><img src=\"train.jpg\" alt=\"foo bar\" title=\"train & tracks\" /></p>", - // "should support image as shortcut reference" - // ); + assert_eq!( + micromark("[foo *bar*]: train.jpg \"train & tracks\"\n\n![foo *bar*]"), + "<p><img src=\"train.jpg\" alt=\"foo bar\" title=\"train & tracks\" /></p>", + "should support image as shortcut reference" + ); assert_eq!( micromark("![foo ![bar](/url)](/url2)"), @@ -33,19 +32,17 @@ fn image() { "should “support” links in images" ); - // To do: attention. - // assert_eq!( - // micromark("[foo *bar*]: train.jpg \"train & tracks\"\n\n![foo *bar*][]"), - // "<p><img src=\"train.jpg\" alt=\"foo bar\" title=\"train & tracks\" /></p>", - // "should support “content” in images" - // ); + assert_eq!( + micromark("[foo *bar*]: train.jpg \"train & tracks\"\n\n![foo *bar*][]"), + "<p><img src=\"train.jpg\" alt=\"foo bar\" title=\"train & tracks\" /></p>", + "should support “content” in images" + ); - // To do: attention. - // assert_eq!( - // micromark("[FOOBAR]: train.jpg \"train & tracks\"\n\n![foo *bar*][foobar]"), - // "<p><img src=\"train.jpg\" alt=\"foo bar\" title=\"train & tracks\" /></p>", - // "should support “content” in images" - // ); + assert_eq!( + micromark("[FOOBAR]: train.jpg \"train & tracks\"\n\n![foo *bar*][foobar]"), + "<p><img src=\"train.jpg\" alt=\"foo bar\" title=\"train & tracks\" /></p>", + "should support “content” in images" + ); assert_eq!( micromark("![foo](train.jpg)"), @@ -89,12 +86,11 @@ fn image() { "should support collapsed references (1)" ); - // To do: attention. - // assert_eq!( - // micromark("[*foo* bar]: /url \"title\"\n\n![*foo* bar][]"), - // "<p><img src=\"/url\" alt=\"foo bar\" title=\"title\" /></p>", - // "should support collapsed references (2)" - // ); + assert_eq!( + micromark("[*foo* bar]: /url \"title\"\n\n![*foo* bar][]"), + "<p><img src=\"/url\" alt=\"foo bar\" title=\"title\" /></p>", + "should support collapsed references (2)" + ); assert_eq!( micromark("[foo]: /url \"title\"\n\n![Foo][]"), @@ -114,12 +110,11 @@ fn image() { "should support shortcut references (1)" ); - // To do: attention. - // assert_eq!( - // micromark("[*foo* bar]: /url \"title\"\n\n![*foo* bar]"), - // "<p><img src=\"/url\" alt=\"foo bar\" title=\"title\" /></p>", - // "should support shortcut references (2)" - // ); + assert_eq!( + micromark("[*foo* bar]: /url \"title\"\n\n![*foo* bar]"), + "<p><img src=\"/url\" alt=\"foo bar\" title=\"title\" /></p>", + "should support shortcut references (2)" + ); assert_eq!( micromark("[[foo]]: /url \"title\"\n\n![[foo]]"), |