summaryrefslogtreecommitdiffstats
path: root/unittests
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-12-17 09:11:08 +0000
committerDaniel Jasper <djasper@google.com>2014-12-17 09:11:08 +0000
commit666557c0af578402d4372768452bfb2ac4bf4f1b (patch)
treec33286d7099dfaba1f06cbc9e51ca7ce2f3b633f /unittests
parent65c422ad3f0e74a95af524bab4bd98eb10615025 (diff)
clang-format: Fix incorrect calculation of token lenghts.
This led, e.g. to break JavaScript regex literals too early. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224419 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Format/FormatTestJS.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/unittests/Format/FormatTestJS.cpp b/unittests/Format/FormatTestJS.cpp
index 1d12d32044..780b02f746 100644
--- a/unittests/Format/FormatTestJS.cpp
+++ b/unittests/Format/FormatTestJS.cpp
@@ -482,6 +482,8 @@ TEST_F(FormatTestJS, RegexLiteralLength) {
verifyFormat("var regex =\n"
" /aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/;",
getGoogleJSStyleWithColumns(60));
+ verifyFormat("var regex = /\\xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/;",
+ getGoogleJSStyleWithColumns(50));
}
TEST_F(FormatTestJS, RegexLiteralExamples) {