diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-08-09 10:47:31 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-08-09 10:47:31 +0200 |
commit | d611ad3325f66eaf83464bbd5ef4de74c0623db9 (patch) | |
tree | 282f8934fcf63278349ab2c75c20640de936c2ac /tests/misc_line_ending.rs | |
parent | 4ce1ac9e41cafa9051377470e8a246063f7d9b1a (diff) | |
download | markdown-rs-d611ad3325f66eaf83464bbd5ef4de74c0623db9.tar.gz markdown-rs-d611ad3325f66eaf83464bbd5ef4de74c0623db9.tar.bz2 markdown-rs-d611ad3325f66eaf83464bbd5ef4de74c0623db9.zip |
Add some more tests for just line endings
Diffstat (limited to 'tests/misc_line_ending.rs')
-rw-r--r-- | tests/misc_line_ending.rs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/misc_line_ending.rs b/tests/misc_line_ending.rs index f6dbccd..3d8934d 100644 --- a/tests/misc_line_ending.rs +++ b/tests/misc_line_ending.rs @@ -10,6 +10,42 @@ fn line_ending() { }; assert_eq!( + micromark("\n"), + "", + "should support just a line feed" + ); + + assert_eq!( + micromark("\r"), + "", + "should support just a carriage return" + ); + + assert_eq!( + micromark("\r\n"), + "", + "should support just a carriage return + line feed" + ); + + assert_eq!( + micromark("\n\n"), + "", + "should support just two line feeds" + ); + + assert_eq!( + micromark("\r\r"), + "", + "should support just two carriage return" + ); + + assert_eq!( + micromark("\r\n\r\n"), + "", + "should support just two carriage return + line feeds" + ); + + assert_eq!( micromark("a\nb"), "<p>a\nb</p>", "should support a line feed for a line ending inside a paragraph" |