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

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