summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-07-02 13:20:45 +0000
committerDaniel Jasper <djasper@google.com>2015-07-02 13:20:45 +0000
commit89095b502603559cf0a92c0e9d4a13658646e412 (patch)
tree4b803cb0b3dd3b751f7fb46ed8d6111e30164156 /unittests
parent66f5404ebc08732a21da6e131d92afe3e1fa2012 (diff)
downloadclang-89095b502603559cf0a92c0e9d4a13658646e412.tar.gz
clang-format: [JS] Support regex literals at the start of a file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241259 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Format/FormatTestJS.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/unittests/Format/FormatTestJS.cpp b/unittests/Format/FormatTestJS.cpp
index 845ae5124b..83c21183df 100644
--- a/unittests/Format/FormatTestJS.cpp
+++ b/unittests/Format/FormatTestJS.cpp
@@ -579,6 +579,7 @@ TEST_F(FormatTestJS, RegexLiteralClassification) {
verifyFormat("var x = a && /abc/.test(y);");
verifyFormat("var x = a || /abc/.test(y);");
verifyFormat("var x = a + /abc/.search(y);");
+ verifyFormat("/abc/.search(y);");
verifyFormat("var regexs = {/abc/, /abc/};");
verifyFormat("return /abc/;");