diff options
Diffstat (limited to 'test/Format/remove-duplicate-includes.cpp')
-rw-r--r-- | test/Format/remove-duplicate-includes.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Format/remove-duplicate-includes.cpp b/test/Format/remove-duplicate-includes.cpp new file mode 100644 index 000000000000..dedb1f4d7ae7 --- /dev/null +++ b/test/Format/remove-duplicate-includes.cpp @@ -0,0 +1,14 @@ +// RUN: grep -Ev "// *[A-Z-]+:" %s \ +// RUN: | clang-format -style="{BasedOnStyle: LLVM, SortIncludes: true}" -lines=1:5 \ +// RUN: | FileCheck -strict-whitespace %s +// CHECK: {{^#include\ <a>$}} +#include <a> +// CHECK: {{^#include\ <b>$}} +#include <b> +#include <a> +#include <b> +#include <b> +{ +// CHECK: {{^\ \ int x\ \ ;$}} + int x ; +} |