clang-format: Don't generate unnecessary replacements for \r\n line endings.
Patch by Mathieu Champlon. Thank you.
llvm-svn: 239900
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index acb1209..f129bbb 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -146,6 +146,13 @@
" f();\n"
"}"));
EXPECT_EQ(0, ReplacementCount);
+ EXPECT_EQ("/*\r\n"
+ "\r\n"
+ "*/\r\n",
+ format("/*\r\n"
+ "\r\n"
+ "*/\r\n"));
+ EXPECT_EQ(0, ReplacementCount);
}
TEST_F(FormatTest, RemovesEmptyLines) {