diff options
author | kjeremy <[email protected]> | 2019-07-31 15:46:15 +0100 |
---|---|---|
committer | kjeremy <[email protected]> | 2019-07-31 15:46:15 +0100 |
commit | 4fccad9b2cea8b17066308129c9add49861f8e07 (patch) | |
tree | 65b1055e81b9c789785e69e49ac21616b820fa1c /crates/ra_lsp_server/src/markdown.rs | |
parent | 4a6cfa1aa7ece5a32176548ce3a8e3605cdb8072 (diff) |
Add explicit newline preserving tests
Diffstat (limited to 'crates/ra_lsp_server/src/markdown.rs')
-rw-r--r-- | crates/ra_lsp_server/src/markdown.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/ra_lsp_server/src/markdown.rs b/crates/ra_lsp_server/src/markdown.rs index 53cf24482..947ef77cd 100644 --- a/crates/ra_lsp_server/src/markdown.rs +++ b/crates/ra_lsp_server/src/markdown.rs | |||
@@ -48,4 +48,10 @@ mod tests { | |||
48 | let comment = " # stay1\n# stay2\n#stay3\nstay4\n#\n #\n # \n #\tstay5\n\t#\t"; | 48 | let comment = " # stay1\n# stay2\n#stay3\nstay4\n#\n #\n # \n #\tstay5\n\t#\t"; |
49 | assert_eq!(format_docs(comment), comment); | 49 | assert_eq!(format_docs(comment), comment); |
50 | } | 50 | } |
51 | |||
52 | #[test] | ||
53 | fn test_format_docs_preserves_newlines() { | ||
54 | let comment = "this\nis\nultiline"; | ||
55 | assert_eq!(format_docs(comment), comment); | ||
56 | } | ||
51 | } | 57 | } |