From 4fccad9b2cea8b17066308129c9add49861f8e07 Mon Sep 17 00:00:00 2001 From: kjeremy Date: Wed, 31 Jul 2019 10:46:15 -0400 Subject: Add explicit newline preserving tests --- crates/ra_lsp_server/src/markdown.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'crates/ra_lsp_server') 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 { let comment = " # stay1\n# stay2\n#stay3\nstay4\n#\n #\n # \n #\tstay5\n\t#\t"; assert_eq!(format_docs(comment), comment); } + + #[test] + fn test_format_docs_preserves_newlines() { + let comment = "this\nis\nultiline"; + assert_eq!(format_docs(comment), comment); + } } -- cgit v1.2.3