summaryrefslogtreecommitdiff
path: root/unittests/Format/SortImportsTestJS.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Format/SortImportsTestJS.cpp')
-rw-r--r--unittests/Format/SortImportsTestJS.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/unittests/Format/SortImportsTestJS.cpp b/unittests/Format/SortImportsTestJS.cpp
index 4208b29702dd..91be0313cf80 100644
--- a/unittests/Format/SortImportsTestJS.cpp
+++ b/unittests/Format/SortImportsTestJS.cpp
@@ -300,6 +300,14 @@ TEST_F(SortImportsTestJS, SortMultiLine) {
"1;");
}
+TEST_F(SortImportsTestJS, SortDefaultImports) {
+ // Reproduces issue where multi-line import was not parsed correctly.
+ verifySort("import {A} from 'a';\n"
+ "import {default as B} from 'b';\n",
+ "import {default as B} from 'b';\n"
+ "import {A} from 'a';\n");
+}
+
} // end namespace
} // end namespace format
} // end namespace clang