aboutsummaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index de794dabb6..3e672ae5a3 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -481,6 +481,12 @@ TEST_F(FormatTest, FormatUnbalancedStructuralElements) {
format("#define A } }\nint i;", getLLVMStyleWithColumns(11)));
}
+TEST_F(FormatTest, EscapedNewlineAtStartOfTokenInMacroDefinition) {
+ EXPECT_EQ("#define A \\\n int i; \\\n int j;",
+ format("#define A \\\nint i;\\\n int j;",
+ getLLVMStyleWithColumns(11)));
+}
+
TEST_F(FormatTest, MixingPreprocessorDirectivesAndNormalCode) {
EXPECT_EQ(
"#define ALooooooooooooooooooooooooooooooooooooooongMacro("