diff options
| author | Martin Probst <martin@probst.io> | 2016-05-12 11:20:32 +0000 |
|---|---|---|
| committer | Martin Probst <martin@probst.io> | 2016-05-12 11:20:32 +0000 |
| commit | a166979e450485af61b24eb54687ea50055683e7 (patch) | |
| tree | 62e35117e83cb71d13844acd8586e29009f762fb /clang/unittests/Format/FormatTestJS.cpp | |
| parent | 194357c5092b34ca2487da76ef828a82b4a4da34 (diff) | |
| download | bcm5719-llvm-a166979e450485af61b24eb54687ea50055683e7.tar.gz bcm5719-llvm-a166979e450485af61b24eb54687ea50055683e7.zip | |
clang-format: [JS] respect clang-format off when requoting strings.
Reviewers: djasper
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D20200
llvm-svn: 269282
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
| -rw-r--r-- | clang/unittests/Format/FormatTestJS.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp index 95fd2e7bb08..72d8948bb7a 100644 --- a/clang/unittests/Format/FormatTestJS.cpp +++ b/clang/unittests/Format/FormatTestJS.cpp @@ -1236,6 +1236,14 @@ TEST_F(FormatTestJS, RequoteStringsSingle) { // Code below fits into 15 chars *after* removing the \ escape. verifyFormat("var x = 'fo\"o';", "var x = \"fo\\\"o\";", getGoogleJSStyleWithColumns(15)); + verifyFormat("// clang-format off\n" + "let x = \"double\";\n" + "// clang-format on\n" + "let x = 'single';\n", + "// clang-format off\n" + "let x = \"double\";\n" + "// clang-format on\n" + "let x = \"single\";\n"); } TEST_F(FormatTestJS, RequoteStringsDouble) { |

