xref: /llvm-project/clang-tools-extra/test/clang-apply-replacements/format-header.cpp (revision 95403b42da0de500f4f86add7a60b0daf8ec98d0)
1*95403b42SDmitry Polukhin // RUN: mkdir -p %T/Inputs/format_header_yes
2*95403b42SDmitry Polukhin // RUN: mkdir -p %T/Inputs/format_header_no
3*95403b42SDmitry Polukhin //
4*95403b42SDmitry Polukhin //
5*95403b42SDmitry Polukhin // RUN: grep -Ev "// *[A-Z-]+:" %S/Inputs/format_header/yes.cpp > %T/Inputs/format_header_yes/yes.cpp
6*95403b42SDmitry Polukhin // RUN: grep -Ev "// *[A-Z-]+:" %S/Inputs/format_header/no.cpp > %T/Inputs/format_header_no/no.cpp
7*95403b42SDmitry Polukhin // RUN: sed "s#\$(path)#%/T/Inputs/format_header_yes#" %S/Inputs/format_header/yes.yaml > %T/Inputs/format_header_yes/yes.yaml
8*95403b42SDmitry Polukhin // RUN: sed "s#\$(path)#%/T/Inputs/format_header_no#" %S/Inputs/format_header/no.yaml > %T/Inputs/format_header_no/no.yaml
9*95403b42SDmitry Polukhin // RUN: clang-apply-replacements -format -style="{BasedOnStyle: llvm, SortIncludes: CaseSensitive}" %T/Inputs/format_header_yes
10*95403b42SDmitry Polukhin // RUN: clang-apply-replacements %T/Inputs/format_header_no
11*95403b42SDmitry Polukhin // RUN: FileCheck --strict-whitespace -input-file=%T/Inputs/format_header_yes/yes.cpp %S/Inputs/format_header/yes.cpp
12*95403b42SDmitry Polukhin // RUN: FileCheck --strict-whitespace -input-file=%T/Inputs/format_header_no/no.cpp %S/Inputs/format_header/no.cpp
13*95403b42SDmitry Polukhin //
14