summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestJS.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2017-02-03 14:32:38 +0000
committerDaniel Jasper <djasper@google.com>2017-02-03 14:32:38 +0000
commitc06f6da34e0a5d3bf4026201c72afee461da014b (patch)
treeafd4366b55f6d9092d9683663cdc826b51b7ddcc /clang/unittests/Format/FormatTestJS.cpp
parent776b417634b2993a68d454d0d7581b4e937108c3 (diff)
downloadbcm5719-llvm-c06f6da34e0a5d3bf4026201c72afee461da014b.tar.gz
bcm5719-llvm-c06f6da34e0a5d3bf4026201c72afee461da014b.zip
clang-format: [JS] Fix bugs in parsing and aligning template strings.
llvm-svn: 294009
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
-rw-r--r--clang/unittests/Format/FormatTestJS.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index 9feda05226c..70bccb9f493 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -1399,6 +1399,10 @@ TEST_F(FormatTestJS, TemplateStrings) {
" aaaaaaaaaaaaa:${aaaaaaa.aaaaa} aaaaaaaa`;",
"var f = `aaaaaaaaaaaaa:${aaaaaaa. aaaaa} aaaaaaaa\n"
" aaaaaaaaaaaaa:${ aaaaaaa. aaaaa} aaaaaaaa`;");
+ verifyFormat("var x = someFunction(`${})`) //\n"
+ " .oooooooooooooooooon();");
+ verifyFormat("var x = someFunction(`${aaaa}${aaaaa( //\n"
+ " aaaaa)})`);");
}
TEST_F(FormatTestJS, TemplateStringMultiLineExpression) {
OpenPOWER on IntegriCloud