summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestJS.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-05-08 07:55:13 +0000
committerDaniel Jasper <djasper@google.com>2015-05-08 07:55:13 +0000
commit69694b069193fdb446dffa84043b218f84e93957 (patch)
treef03bad670a1b8ede43f683e0a17ac854ab50fbe3 /clang/unittests/Format/FormatTestJS.cpp
parent8eb9d1bf124c8344663aca5e45323913be7ff292 (diff)
downloadbcm5719-llvm-69694b069193fdb446dffa84043b218f84e93957.tar.gz
bcm5719-llvm-69694b069193fdb446dffa84043b218f84e93957.zip
clang-format: [JS] Fix regex literal detection.
Before: var regex = /= / ; After: var regex = /=/; llvm-svn: 236811
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
-rw-r--r--clang/unittests/Format/FormatTestJS.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index 43fc4b47284..0d37caf1c94 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -463,6 +463,7 @@ TEST_F(FormatTestJS, RegexLiteralClassification) {
}
TEST_F(FormatTestJS, RegexLiteralSpecialCharacters) {
+ verifyFormat("var regex = /=/;");
verifyFormat("var regex = /a*/;");
verifyFormat("var regex = /a+/;");
verifyFormat("var regex = /a?/;");
OpenPOWER on IntegriCloud