summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-10-30 07:36:40 +0000
committerDaniel Jasper <djasper@google.com>2013-10-30 07:36:40 +0000
commit580da276161ee8b2aa7bc6bd4631cd8261fb9bfb (patch)
tree9bd4088f798013e14b8fc65095762ecd7dc387cf /clang/unittests/Format/FormatTest.cpp
parent3bd686d49362d88abedfef45d9f02c2d016cf601 (diff)
downloadbcm5719-llvm-580da276161ee8b2aa7bc6bd4631cd8261fb9bfb.tar.gz
bcm5719-llvm-580da276161ee8b2aa7bc6bd4631cd8261fb9bfb.zip
clang-format: fix for \r\r\n produced in multiline block comments
Patch by Christopher Olsen. Thank you! llvm-svn: 193678
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 991763cdf7f..2f6e06ff02d 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -6984,6 +6984,17 @@ TEST_F(FormatTest, SupportsCRLF) {
" b; \\\r\n"
" c; d; \r\n",
getGoogleStyle()));
+
+ EXPECT_EQ("/*\r\n"
+ "multi line block comments\r\n"
+ "should not introduce\r\n"
+ "an extra carriage return\r\n"
+ "*/\r\n",
+ format("/*\r\n"
+ "multi line block comments\r\n"
+ "should not introduce\r\n"
+ "an extra carriage return\r\n"
+ "*/\r\n"));
}
TEST_F(FormatTest, MunchSemicolonAfterBlocks) {
OpenPOWER on IntegriCloud