xref: /llvm-project/clang/test/Format/remove-duplicate-includes.cpp (revision a992afe80977bedcbe85a1140efcc8fd28878df1)
1*a992afe8SEric Liu // RUN: grep -Ev "// *[A-Z-]+:" %s \
2*a992afe8SEric Liu // RUN:   | clang-format -style="{BasedOnStyle: LLVM, SortIncludes: true}" -lines=1:5 \
3*a992afe8SEric Liu // RUN:   | FileCheck -strict-whitespace %s
4*a992afe8SEric Liu // CHECK: {{^#include\ <a>$}}
5*a992afe8SEric Liu #include  <a>
6*a992afe8SEric Liu // CHECK: {{^#include\ <b>$}}
7*a992afe8SEric Liu #include  <b>
8*a992afe8SEric Liu #include  <a>
9*a992afe8SEric Liu #include  <b>
10*a992afe8SEric Liu #include  <b>
11*a992afe8SEric Liu {
12*a992afe8SEric Liu // CHECK: {{^\ \ int x\ \ ;$}}
13*a992afe8SEric Liu   int x  ;
14*a992afe8SEric Liu }
15