aboutsummaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2013-03-04 20:03:38 +0000
committerManuel Klimek <klimek@google.com>2013-03-04 20:03:38 +0000
commit0090591e505637cf2d9ea3b45768334d78d24ca2 (patch)
treeb7006f301f2bd919c99b48ba65a156449b1f7ebb /unittests/Format/FormatTest.cpp
parent151b2ac8c84fe751871dcdb041efec655fab70eb (diff)
Make sure to not split string literals at the first character.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176447 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 46eb1bcfdf..eafc4c8512 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -3043,6 +3043,14 @@ TEST_F(FormatTest, BreakStringLiterals) {
EXPECT_EQ("\"some\"\n"
"\" text\"",
format("\"some text\"", getLLVMStyleWithColumns(6)));
+ EXPECT_EQ("\"some\"\n"
+ "\" tex\"\n"
+ "\" and\"",
+ format("\"some tex and\"", getLLVMStyleWithColumns(6)));
+ EXPECT_EQ("\"some\"\n"
+ "\"/tex\"\n"
+ "\"/and\"",
+ format("\"some/tex/and\"", getLLVMStyleWithColumns(6)));
EXPECT_EQ("variable =\n"
" \"long string \"\n"