summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2017-01-31 12:07:35 +0000
committerDaniel Jasper <djasper@google.com>2017-01-31 12:07:35 +0000
commitf201929010030af03686334aeb906f9570f17843 (patch)
tree572c3651ed7b9d9af47a084f216517d5bd826e2b /clang/unittests/Format
parent8f62cf74ef3377f01b81c909a8de6cbffa2c9cb4 (diff)
downloadbcm5719-llvm-f201929010030af03686334aeb906f9570f17843.tar.gz
bcm5719-llvm-f201929010030af03686334aeb906f9570f17843.zip
clang-format: [JS] Fix incorrect line break in template strings.
Before: var f = `aaaa ${a ? 'a' : 'b' }`; After: var f = `aaaa ${a ? 'a' : 'b'}`; llvm-svn: 293618
Diffstat (limited to 'clang/unittests/Format')
-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 8e33346d630..71821a06499 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -1388,6 +1388,10 @@ TEST_F(FormatTestJS, TemplateStrings) {
"var y;");
// Escaped dollar.
verifyFormat("var x = ` \\${foo}`;\n");
+
+ // The token stream can contain two string_literals in sequence, but that
+ // doesn't mean that they are implicitly concatenated in JavaScript.
+ verifyFormat("var f = `aaaa ${a ? 'a' : 'b'}`;");
}
TEST_F(FormatTestJS, TemplateStringASI) {
OpenPOWER on IntegriCloud