1// RUN: mkdir -p %T/Inputs/yml-basic
2// RUN: grep -Ev "// *[A-Z-]+:" %S/Inputs/yml-basic/basic.h > %T/Inputs/yml-basic/basic.h
3// RUN: sed "s#\$(path)#%/T/Inputs/yml-basic#" %S/Inputs/yml-basic/file1.yml > %T/Inputs/yml-basic/file1.yml
4// RUN: sed "s#\$(path)#%/T/Inputs/yml-basic#" %S/Inputs/yml-basic/file2.yml > %T/Inputs/yml-basic/file2.yml
5// RUN: clang-apply-replacements %T/Inputs/yml-basic
6// RUN: FileCheck -input-file=%T/Inputs/yml-basic/basic.h %S/Inputs/yml-basic/basic.h
7//
8// Check that the yml files are *not* deleted after running clang-apply-replacements without remove-change-desc-files.
9// RUN: ls -1 %T/Inputs/yml-basic | FileCheck %s --check-prefix=YML
10//
11// Check that the yml files *are* deleted after running clang-apply-replacements with remove-change-desc-files.
12// RUN: grep -Ev "// *[A-Z-]+:" %S/Inputs/yml-basic/basic.h > %T/Inputs/yml-basic/basic.h
13// RUN: clang-apply-replacements -remove-change-desc-files %T/Inputs/yml-basic
14// RUN: ls -1 %T/Inputs/yml-basic | FileCheck %s --check-prefix=NO_YML
15//
16// YML: {{^file.\.yml$}}
17// NO_YML-NOT: {{^file.\.yml$}}
18

source code of clang-tools-extra/test/clang-apply-replacements/yml-basic.cpp