summaryrefslogtreecommitdiff
path: root/unittests/Format/SortImportsTestJS.cpp
diff options
context:
space:
mode:
authorMartin Probst <martin@probst.io>2016-07-09 15:09:22 +0000
committerMartin Probst <martin@probst.io>2016-07-09 15:09:22 +0000
commit3c9460b0d41b8e1953dca467d9d0031c1d7f3976 (patch)
tree20a9e113312a5dacd1f8bd2b8fa16c989a71b943 /unittests/Format/SortImportsTestJS.cpp
parent7935857d54fc4ce53f3c4149affcf4f38af3a4bc (diff)
clang-format: [JS] support trailing commas in imports.
Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: http://reviews.llvm.org/D22147 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274976 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/SortImportsTestJS.cpp')
-rw-r--r--unittests/Format/SortImportsTestJS.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/unittests/Format/SortImportsTestJS.cpp b/unittests/Format/SortImportsTestJS.cpp
index cc408ca9da..769fa793da 100644
--- a/unittests/Format/SortImportsTestJS.cpp
+++ b/unittests/Format/SortImportsTestJS.cpp
@@ -236,6 +236,10 @@ TEST_F(SortImportsTestJS, SortingCanShrink) {
"1;");
}
+TEST_F(SortImportsTestJS, TrailingComma) {
+ verifySort("import {A, B,} from 'aa';\n", "import {B, A,} from 'aa';\n");
+}
+
} // end namespace
} // end namespace format
} // end namespace clang