From de51d671486b6ac9a2ad9ee5fcfdb1a23cc59238 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 19 Jul 2017 07:02:30 +0000 Subject: Vendor import of clang trunk r308421: https://llvm.org/svn/llvm-project/cfe/trunk@308421 --- unittests/Format/SortImportsTestJS.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'unittests/Format/SortImportsTestJS.cpp') diff --git a/unittests/Format/SortImportsTestJS.cpp b/unittests/Format/SortImportsTestJS.cpp index 7e766e1969e12..4208b29702dd6 100644 --- a/unittests/Format/SortImportsTestJS.cpp +++ b/unittests/Format/SortImportsTestJS.cpp @@ -283,6 +283,23 @@ TEST_F(SortImportsTestJS, SortCaseInsensitive) { "1;"); } +TEST_F(SortImportsTestJS, SortMultiLine) { + // Reproduces issue where multi-line import was not parsed correctly. + verifySort("import {A} from 'a';\n" + "import {A} from 'b';\n" + "\n" + "1;", + "import\n" + "{\n" + "A\n" + "}\n" + "from\n" + "'b';\n" + "import {A} from 'a';\n" + "\n" + "1;"); +} + } // end namespace } // end namespace format } // end namespace clang -- cgit v1.2.3