From 8cfadc5850a1beaca19f872539acda39641b2d16 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Wed, 15 Jun 2022 12:18:20 +0200 Subject: Add tests for soft breaks --- tests/misc_soft_break.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/misc_soft_break.rs diff --git a/tests/misc_soft_break.rs b/tests/misc_soft_break.rs new file mode 100644 index 0000000..1704ec2 --- /dev/null +++ b/tests/misc_soft_break.rs @@ -0,0 +1,18 @@ +extern crate micromark; +use micromark::micromark; + +#[test] +fn soft_break() { + assert_eq!( + micromark("foo\nbaz"), + "

foo\nbaz

", + "should support line endings" + ); + + // To do: trim whitespace. + // assert_eq!( + // micromark("foo \n baz"), + // "

foo\nbaz

", + // "should trim spaces around line endings" + // ); +} -- cgit